/[gxemul]/trunk/src/device.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/device.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Mon Oct 8 16:17:48 2007 UTC revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: device.c,v 1.13 2005/02/26 17:37:25 debug Exp $   *  $Id: device.c,v 1.14 2005/06/22 08:13:38 debug Exp $
29   *   *
30   *  Device registry framework.   *  Device registry framework.
31   */   */
# Line 164  struct device_entry *device_lookup(char Line 164  struct device_entry *device_lookup(char
164                  if (step == 0)                  if (step == 0)
165                          do_return = 1;                          do_return = 1;
166    
167                  step /= 2;                  if (step & 1)
168                            step = (step/2) + 1;
169                    else
170                            step /= 2;
171          }          }
172  }  }
173    
# Line 213  int device_unregister(char *name) Line 216  int device_unregister(char *name)
216  /*  /*
217   *  device_add():   *  device_add():
218   *   *
219   *  Add a device to a machine.   *  Add a device to a machine. For example: "kn210 addr=0x12340000" adds a
220     *  device called "kn210" at a specific address.
221   *   *
222   *      "kn210 addr=0x12340000"   adds a kn210 device at a specific address.   *  TODO: This function is quite ugly, and should be cleaned up.
223   */   */
224  void *device_add(struct machine *machine, char *name_and_params)  void *device_add(struct machine *machine, char *name_and_params)
225  {  {
# Line 349  void device_dumplist(void) Line 353  void device_dumplist(void)
353    
354  /*  /*
355   *  device_set_exit_on_error():   *  device_set_exit_on_error():
356     *
357     *  This function selects the behaviour of the emulator when a device is not
358     *  found. During startup, it is nicest to abort the whole emulator session,
359     *  but if a device addition is attempted from within the debugger, then it is
360     *  nicer to just print a warning and continue.
361   */   */
362  void device_set_exit_on_error(int exit_on_error)  void device_set_exit_on_error(int exit_on_error)
363  {  {
# Line 360  void device_set_exit_on_error(int exit_o Line 369  void device_set_exit_on_error(int exit_o
369   *  device_init():   *  device_init():
370   *   *
371   *  Initialize the device registry, and call autodev_init() to automatically   *  Initialize the device registry, and call autodev_init() to automatically
372   *  add all normal devices (from the devices/ directory).   *  add all normal devices (from the src/devices/ directory).
373   *   *
374   *  This function should be called before any other device_*() function is used.   *  This function should be called before any other device_*() function is used.
375   */   */

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26