- code cleanup: removed unused defines and structure members
- removed plugin flag 'use_devmodel_interface' (all plugins are using it)
This commit is contained in:
parent
2ad483d95d
commit
c56b918a8e
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: bochs.h,v 1.166 2006-01-19 18:32:39 sshwarts Exp $
|
||||
// $Id: bochs.h,v 1.167 2006-01-20 19:12:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -493,20 +493,13 @@ BOCHSAPI extern bx_debug_t bx_dbg;
|
||||
#define DATA_ACCESS 0
|
||||
#define CODE_ACCESS 1
|
||||
|
||||
|
||||
#include "memory/memory.h"
|
||||
|
||||
|
||||
enum PCS_OP { PCS_CLEAR, PCS_SET, PCS_TOGGLE };
|
||||
|
||||
#include "pc_system.h"
|
||||
#include "plugin.h"
|
||||
#include "gui/gui.h"
|
||||
#include "gui/textconfig.h"
|
||||
#include "gui/keymap.h"
|
||||
|
||||
|
||||
|
||||
/* --- EXTERNS --- */
|
||||
|
||||
#if BX_GUI_SIGHANDLER
|
||||
@ -647,7 +640,6 @@ typedef struct BOCHSAPI {
|
||||
bx_param_enum_c *Okeyboard_type;
|
||||
bx_param_num_c *Ocpu_count;
|
||||
bx_param_num_c *Oips;
|
||||
bx_param_bool_c *Orealtime_pit;
|
||||
bx_param_bool_c *Otext_snapshot_check;
|
||||
bx_param_bool_c *Omouse_enabled;
|
||||
bx_param_enum_c *Omouse_type;
|
||||
|
@ -184,7 +184,6 @@
|
||||
// Use Greg Alexander's new PIT model (summer 2001) instead of the original.
|
||||
#define BX_USE_NEW_PIT 0
|
||||
|
||||
#define BX_USE_SLOWDOWN_TIMER 0
|
||||
#define BX_HAVE_SLEEP 0
|
||||
#define BX_HAVE_MSLEEP 0
|
||||
#define BX_HAVE_USLEEP 0
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pc_system.cc,v 1.46 2005-12-26 17:16:32 vruppert Exp $
|
||||
// $Id: pc_system.cc,v 1.47 2006-01-20 19:12:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -82,7 +82,6 @@ void bx_pc_system_c::init_ips(Bit32u ips)
|
||||
HRQ = 0;
|
||||
|
||||
enable_a20 = 1;
|
||||
//set_INTR (0);
|
||||
|
||||
#if BX_CPU_LEVEL < 2
|
||||
a20_mask = 0xfffff;
|
||||
@ -111,7 +110,6 @@ void bx_pc_system_c::set_INTR(bx_bool value)
|
||||
{
|
||||
if (bx_dbg.interrupts)
|
||||
BX_INFO(("pc_system: Setting INTR=%d on bootstrap processor %d", (int)value, BX_BOOTSTRAP_PROCESSOR));
|
||||
//INTR = value;
|
||||
BX_CPU(BX_BOOTSTRAP_PROCESSOR)->set_INTR(value);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pc_system.h,v 1.33 2005-07-04 18:02:37 sshwarts Exp $
|
||||
// $Id: pc_system.h,v 1.34 2006-01-20 19:12:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2004 MandrakeSoft S.A.
|
||||
@ -144,30 +144,26 @@ public:
|
||||
// ===========================
|
||||
|
||||
bx_bool HRQ; // Hold Request
|
||||
//bx_bool INTR; // Interrupt
|
||||
|
||||
|
||||
// Address line 20 control:
|
||||
// 1 = enabled: extended memory is accessible
|
||||
// 0 = disabled: A20 address line is forced low to simulate
|
||||
// an 8088 address map
|
||||
// Address line 20 control:
|
||||
// 1 = enabled: extended memory is accessible
|
||||
// 0 = disabled: A20 address line is forced low to simulate
|
||||
// an 8088 address map
|
||||
bx_bool enable_a20;
|
||||
|
||||
// start out masking physical memory addresses to:
|
||||
// 8086: 20 bits
|
||||
// 286: 24 bits
|
||||
// 386: 32 bits
|
||||
// when A20 line is disabled, mask physical memory addresses to:
|
||||
// 286: 20 bits
|
||||
// 386: 20 bits
|
||||
//
|
||||
// start out masking physical memory addresses to:
|
||||
// 8086: 20 bits
|
||||
// 286: 24 bits
|
||||
// 386: 32 bits
|
||||
// when A20 line is disabled, mask physical memory addresses to:
|
||||
// 286: 20 bits
|
||||
// 386: 20 bits
|
||||
//
|
||||
Bit32u a20_mask;
|
||||
|
||||
void set_HRQ(bx_bool val); // set the Hold ReQuest line
|
||||
void set_INTR(bx_bool value); // set the INTR line to value
|
||||
|
||||
int IntEnabled( void );
|
||||
int InterruptSignal( PCS_OP operation );
|
||||
// Cpu and System Reset
|
||||
int Reset( unsigned type );
|
||||
Bit8u IAC(void);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: plugin.cc,v 1.13 2004-08-11 11:05:10 vruppert Exp $
|
||||
// $Id: plugin.cc,v 1.14 2006-01-20 19:12:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This file defines the plugin and plugin-device registration functions and
|
||||
@ -507,7 +507,6 @@ void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmod
|
||||
BX_ASSERT (devmodel != NULL);
|
||||
device->devmodel = devmodel;
|
||||
device->plugin = plugin; // this can be NULL
|
||||
device->use_devmodel_interface = 1;
|
||||
device->device_init_mem = NULL; // maybe should use 1 to detect any use?
|
||||
device->device_init_dev = NULL;
|
||||
device->device_reset = NULL;
|
||||
@ -587,28 +586,14 @@ void bx_init_plugins()
|
||||
// two loops
|
||||
for (device = devices; device; device = device->next)
|
||||
{
|
||||
if (!device->use_devmodel_interface) {
|
||||
if (device->device_init_mem != NULL) {
|
||||
pluginlog->info("init_mem of '%s' plugin device by function pointer",device->name);
|
||||
device->device_init_mem(BX_MEM(0));
|
||||
}
|
||||
} else {
|
||||
pluginlog->info("init_mem of '%s' plugin device by virtual method",device->name);
|
||||
device->devmodel->init_mem (BX_MEM(0));
|
||||
}
|
||||
pluginlog->info("init_mem of '%s' plugin device by virtual method",device->name);
|
||||
device->devmodel->init_mem(BX_MEM(0));
|
||||
}
|
||||
|
||||
for (device = devices; device; device = device->next)
|
||||
{
|
||||
if (!device->use_devmodel_interface) {
|
||||
if (device->device_init_dev != NULL) {
|
||||
pluginlog->info("init_dev of '%s' plugin device by function pointer",device->name);
|
||||
device->device_init_dev();
|
||||
}
|
||||
} else {
|
||||
pluginlog->info("init_dev of '%s' plugin device by virtual method",device->name);
|
||||
device->devmodel->init ();
|
||||
}
|
||||
pluginlog->info("init_dev of '%s' plugin device by virtual method",device->name);
|
||||
device->devmodel->init();
|
||||
}
|
||||
}
|
||||
|
||||
@ -621,15 +606,8 @@ void bx_reset_plugins(unsigned signal)
|
||||
device_t *device;
|
||||
for (device = devices; device; device = device->next)
|
||||
{
|
||||
if (!device->use_devmodel_interface) {
|
||||
if (device->device_reset != NULL) {
|
||||
pluginlog->info("reset of '%s' plugin device by function pointer",device->name);
|
||||
device->device_reset(signal);
|
||||
}
|
||||
} else {
|
||||
pluginlog->info("reset of '%s' plugin device by virtual method",device->name);
|
||||
device->devmodel->reset (signal);
|
||||
}
|
||||
pluginlog->info("reset of '%s' plugin device by virtual method",device->name);
|
||||
device->devmodel->reset(signal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: plugin.h,v 1.46 2005-12-26 17:16:32 vruppert Exp $
|
||||
// $Id: plugin.h,v 1.47 2006-01-20 19:12:03 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This file provides macros and types needed for plugins. It is based on
|
||||
@ -246,7 +246,6 @@ typedef struct _device_t
|
||||
void (*device_load_state)();
|
||||
void (*device_save_state)();
|
||||
|
||||
int use_devmodel_interface; // BBD hack
|
||||
class bx_devmodel_c *devmodel; // BBD hack
|
||||
|
||||
struct _device_t *next;
|
||||
|
Loading…
x
Reference in New Issue
Block a user