Search
lxdream.org :: lxdream/src/main.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/main.c
changeset 9:2784c7660165
prev2:42349f6ea216
next11:0a82ef380c45
author nkeynes
date Thu Dec 08 13:38:00 2005 +0000 (16 years ago)
permissions -rw-r--r--
last change Generalise the core debug window to allow multiple instances.
Add cpu description structure to define different cpus for use by the
debug window, in preparation for ARM implementation
file annotate diff log raw
nkeynes@1
     1
/*
nkeynes@1
     2
 * Initial main.c file generated by Glade. Edit as required.
nkeynes@1
     3
 * Glade will not overwrite this file.
nkeynes@1
     4
 */
nkeynes@1
     5
nkeynes@1
     6
#ifdef HAVE_CONFIG_H
nkeynes@1
     7
#  include <config.h>
nkeynes@1
     8
#endif
nkeynes@1
     9
nkeynes@1
    10
#include <gnome.h>
nkeynes@1
    11
nkeynes@1
    12
#include "interface.h"
nkeynes@1
    13
#include "gui.h"
nkeynes@1
    14
#include "sh4core.h"
nkeynes@9
    15
#include "sh4dasm.h"
nkeynes@2
    16
#include "mem.h"
nkeynes@1
    17
nkeynes@9
    18
debug_info_t main_debug;
nkeynes@1
    19
nkeynes@1
    20
int
nkeynes@1
    21
main (int argc, char *argv[])
nkeynes@1
    22
{
nkeynes@1
    23
  GtkWidget *debug_win;
nkeynes@1
    24
nkeynes@1
    25
#ifdef ENABLE_NLS
nkeynes@1
    26
  bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
nkeynes@1
    27
  textdomain (PACKAGE);
nkeynes@1
    28
#endif
nkeynes@1
    29
  gnome_init ("dreamon", VERSION, argc, argv);
nkeynes@2
    30
  init_gui();
nkeynes@1
    31
  debug_win = create_debug_win ();
nkeynes@9
    32
  main_debug = init_debug_win(debug_win, &sh4_cpu_desc);
nkeynes@1
    33
  video_open();
nkeynes@2
    34
  dreamcast_init();
nkeynes@1
    35
  init_mmr_win(); /* Note: must be done after sh4_init */
nkeynes@1
    36
  sh4_reset();
nkeynes@2
    37
  update_gui();
nkeynes@1
    38
  gtk_widget_show (debug_win);
nkeynes@9
    39
  set_disassembly_region( main_debug, 0xA0000000 );
nkeynes@2
    40
  // mem_new_watch( 0x0C204818, 0x0C204830, WATCH_WRITE );
nkeynes@2
    41
  
nkeynes@9
    42
  emit( main_debug, EMIT_INFO, -1, "DreamOn! ready..." );
nkeynes@1
    43
nkeynes@1
    44
  gtk_main ();
nkeynes@1
    45
  return 0;
nkeynes@1
    46
}
nkeynes@1
    47
.