Break long lines.

Make them 130 characters or less.
This commit is contained in:
joevt
2025-01-17 03:41:16 -08:00
committed by dingusdev
parent 8de2c9dafc
commit 2f30395d00
22 changed files with 100 additions and 47 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-23 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -146,7 +146,9 @@ private:
std::function<void()> notify_timer_changes;
std::atomic<uint32_t> id{0};
bool cb_active = false; // true if a timer callback is executing // FIXME: Do we need this? It gets written in main thread and read in audio thread.
// FIXME: Do we need this? It gets written in main thread and read in audio thread.
bool cb_active = false; // true if a timer callback is executing
};
#endif // TIMER_MANAGER_H
+2 -1
View File
@@ -327,7 +327,8 @@ extern bool int_pin;
extern bool dec_exception_pending;
extern bool is_601; // For PowerPC 601 Emulation
extern bool include_601; // For non-PowerPC 601 emulation with 601 extras (matches Mac OS 9 environment which can emulate MPC 601 instructions)
extern bool include_601; // For non-PowerPC 601 emulation with 601 extras
// (matches Mac OS 9 environment which can emulate MPC 601 instructions)
extern bool is_altivec; // For Altivec Emulation
extern bool is_64bit; // For PowerPC G5 Emulation
+6 -3
View File
@@ -153,9 +153,12 @@ public:
op_name_counts.emplace_back(op_name, pair.second);
}
size_t top_ops_size = std::min(op_name_counts.size(), size_t(20));
std::partial_sort(op_name_counts.begin(), op_name_counts.begin() + top_ops_size, op_name_counts.end(), [](const auto& a, const auto& b) {
return b.second < a.second;
});
std::partial_sort(
op_name_counts.begin(), op_name_counts.begin() + top_ops_size, op_name_counts.end(),
[](const auto& a, const auto& b) {
return b.second < a.second;
}
);
op_name_counts.resize(top_ops_size);
for (const auto& pair : op_name_counts) {
vars.push_back({.name = "Instruction " + pair.first,
+3 -2
View File
@@ -302,10 +302,11 @@ static void read_test_float_data() {
if ((tokens[0].rfind("FCMP") && (ppc_state.fpr[3].int64_r != dest_64)) ||
(ppc_state.fpscr != check_fpscr) ||
(ppc_state.cr != check_cr)) {
cout << "Mismatch: instr=" << tokens[0] << ", src1=" << scientific << dfp_src1 << ", src2=" << scientific << dfp_src2 << ", src3=" << scientific << dfp_src3 << endl;
cout << "Mismatch: instr=" << tokens[0] << ", src1=" << scientific << dfp_src1
<< ", src2=" << scientific << dfp_src2 << ", src3=" << scientific << dfp_src3 << endl;
cout << "expected: dest=0x" << hex << dest_64 << ", FPSCR=0x" << hex << check_fpscr
<< ", CR=0x"
<< hex << check_cr << endl;
<< hex << check_cr << endl;
cout << "got: dest=0x" << hex << ppc_state.fpr[3].int64_r << ", FPSCR=0x" << hex
<< ppc_state.fpscr << ", CR=0x" << hex << ppc_state.cr << endl;
cout << "Test file line #: " << dec << lineno << endl << endl;
+3 -1
View File
@@ -29,7 +29,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <loguru.hpp>
AdbMouse::AdbMouse(
std::string name, uint8_t device_class, int num_buttons, int num_bits, uint16_t resolution) : AdbDevice(name), device_class(device_class), num_buttons(num_buttons), num_bits(num_bits), resolution(resolution) {
std::string name, uint8_t device_class, int num_buttons, int num_bits, uint16_t resolution
) : AdbDevice(name), device_class(device_class), num_buttons(num_buttons), num_bits(num_bits), resolution(resolution)
{
EventManager::get_instance()->add_mouse_handler(this, &AdbMouse::event_handler);
this->reset();
+4 -2
View File
@@ -241,7 +241,8 @@ void AtapiCdrom::perform_packet_command() {
else {
disk_image_byte_count = (this->r_byte_count / bytes_per_block) * this->block_size; // whole blocks
if ((this->r_byte_count % bytes_per_block) > bytes_prolog) { // partial block
int disk_image_byte_count_partial_block = (this->r_byte_count % bytes_per_block) - bytes_prolog; // remove prolog from partial block
int disk_image_byte_count_partial_block =
(this->r_byte_count % bytes_per_block) - bytes_prolog; // remove prolog from partial block
if (disk_image_byte_count_partial_block > this->block_size) { // partial block includes some epilog?
disk_image_byte_count_partial_block = this->block_size; // // remove epilog from partial block
}
@@ -252,7 +253,8 @@ void AtapiCdrom::perform_packet_command() {
int disk_image_bytes_received = this->read_begin(xfer_len, disk_image_byte_count);
int bytes_received = (disk_image_bytes_received / this->block_size) * bytes_per_block + bytes_prolog + (disk_image_bytes_received % this->block_size); // whole blocks + prolog + partial block
int bytes_received = (disk_image_bytes_received / this->block_size) * bytes_per_block + bytes_prolog +
(disk_image_bytes_received % this->block_size); // whole blocks + prolog + partial block
if (bytes_received > this->r_byte_count) { // if partial epilog or partial prolog
bytes_received = this->r_byte_count; // confine to r_byte_count
}
+4 -2
View File
@@ -191,7 +191,8 @@ void PCIBase::set_bar_value(int bar_num, uint32_t value)
case PCIBarType::Io_32_Bit:
this->bars[bar_num] = (value & bar_cfg & ~3) | (bar_cfg & 3);
if (value != 0xFFFFFFFFUL && (value & ~3) != (value & bar_cfg & ~3)) {
LOG_F(ERROR, "%s: BAR %d cannot be 0x%08x (set to 0x%08x)", this->get_name().c_str(), bar_num, (value & ~3), (value & bar_cfg & ~3));
LOG_F(ERROR, "%s: BAR %d cannot be 0x%08x (set to 0x%08x)",
this->get_name().c_str(), bar_num, (value & ~3), (value & bar_cfg & ~3));
}
break;
@@ -200,7 +201,8 @@ void PCIBase::set_bar_value(int bar_num, uint32_t value)
case PCIBarType::Mem_64_Bit_Lo:
this->bars[bar_num] = (value & bar_cfg & ~0xF) | (bar_cfg & 0xF);
if (value != 0xFFFFFFFFUL && (value & ~0xF) != (value & bar_cfg & ~0xF)) {
LOG_F(ERROR, "%s: BAR %d cannot be 0x%08x (set to 0x%08x)", this->get_name().c_str(), bar_num, (value & ~0xF), (value & bar_cfg & ~0xF));
LOG_F(ERROR, "%s: BAR %d cannot be 0x%08x (set to 0x%08x)",
this->get_name().c_str(), bar_num, (value & ~0xF), (value & bar_cfg & ~0xF));
}
break;
+3 -1
View File
@@ -47,7 +47,9 @@ enum {
PCI_CFG_BAR0 = 0x10, // base address register 0 (type 0, 1, and 2)
PCI_CFG_BAR1 = 0x14, // base address register 1 (type 0 and 1)
PCI_CFG_DWORD_13 = 0x34, // capabilities pointer (type 0 and 1)
PCI_CFG_DWORD_15 = 0x3C, // Max_Lat, Min_Gnt (Type 0); Bridge Control (Type 1 and 2); Int_Pin and Int_Line registers (type 0, 1, and 2)
PCI_CFG_DWORD_15 = 0x3C, // Max_Lat, Min_Gnt (Type 0)
// Bridge Control (Type 1 and 2)
// Int_Pin and Int_Line registers (type 0, 1, and 2)
};
/** PCI Vendor IDs for devices used in Power Macintosh computers. */
+2 -1
View File
@@ -81,7 +81,8 @@ void PCIHost::pci_unregister_device(int dev_fun_num)
HWComponent *hwc = dynamic_cast<HWComponent*>(this);
LOG_F(
// FIXME: need destructors to remove memory regions and downstream devices.
ERROR, "%s: pci_unregister_device(%s) not supported yet (every PCI device needs a working destructor to unregister memory and downstream devices etc.)",
ERROR, "%s: pci_unregister_device(%s) not supported yet (every PCI device needs "
"a working destructor to unregister memory and downstream devices etc.)",
hwc ? hwc->get_name().c_str() : "PCIHost", dev_instance->get_name().c_str()
);
+6 -3
View File
@@ -223,7 +223,8 @@ void ScsiHardDisk::inquiry() {
int lun;
if (this->last_selection_has_atention) {
LOG_F(INFO, "%s: INQUIRY (%d bytes) with ATN LUN = %02x & 7", this->name.c_str(), alloc_len, this->last_selection_message);
LOG_F(INFO, "%s: INQUIRY (%d bytes) with ATN LUN = %02x & 7",
this->name.c_str(), alloc_len, this->last_selection_message);
lun = this->last_selection_message & 7;
}
else {
@@ -462,7 +463,8 @@ void ScsiHardDisk::read(uint32_t lba, uint16_t transfer_len, uint8_t cmd_len) {
size_t data_buf_size = sizeof(this->data_buf);
if (transfer_size > data_buf_size) {
ABORT_F("%s: cannot read %d bytes (%d sectors * %d bytes/sector), maximum size is %lu bytes", this->name.c_str(), transfer_size, transfer_len, this->sector_size, data_buf_size);
ABORT_F("%s: cannot read %d bytes (%d sectors * %d bytes/sector), maximum size is %lu bytes",
this->name.c_str(), transfer_size, transfer_len, this->sector_size, data_buf_size);
}
std::memset(this->data_buf, 0, data_buf_size);
@@ -484,7 +486,8 @@ void ScsiHardDisk::write(uint32_t lba, uint16_t transfer_len, uint8_t cmd_len) {
size_t data_buf_size = sizeof(this->data_buf);
if (transfer_size > data_buf_size) {
ABORT_F("%s: cannot write %d bytes (%d sectors * %d bytes/sector), maximum size is %lu bytes", this->name.c_str(), transfer_size, transfer_len, this->sector_size, data_buf_size);
ABORT_F("%s: cannot write %d bytes (%d sectors * %d bytes/sector), maximum size is %lu bytes",
this->name.c_str(), transfer_size, transfer_len, this->sector_size, data_buf_size);
}
uint64_t device_offset = (uint64_t)lba * this->sector_size;
+2 -1
View File
@@ -67,7 +67,8 @@ void MacSuperDrive::command(uint8_t addr, uint8_t value)
if (this->cur_track < 0)
this->cur_track = 0;
else if (this->cur_track >= this->num_tracks) {
LOG_F(ERROR, "%s: track:%d is greater than max track:%d", this->get_name().c_str(), this->cur_track, this->num_tracks - 1);
LOG_F(ERROR, "%s: track:%d is greater than max track:%d",
this->get_name().c_str(), this->cur_track, this->num_tracks - 1);
this->cur_track = this->num_tracks - 1;
}
this->track_zero = this->cur_track == 0;
+4 -1
View File
@@ -252,7 +252,10 @@ uint32_t GrandCentral::read(uint32_t rgn_start, uint32_t offset, int size)
case MIO_GC_DMA_AUDIO_OUT:
return this->snd_out_dma->reg_read(offset & 0xFF, size);
case MIO_GC_DMA_AUDIO_IN:
//LOG_F(WARNING, "%s: Unsupported DMA channel DMA_AUDIO_IN read @%02x.%c", this->name.c_str(), offset & 0xFF, SIZE_ARG(size));
#if 0
LOG_F(WARNING, "%s: Unsupported DMA channel DMA_AUDIO_IN read @%02x.%c",
this->name.c_str(), offset & 0xFF, SIZE_ARG(size));
#endif
return 0; // this->snd_in_dma->reg_read(offset & 0xFF, size);
case MIO_GC_DMA_SCSI_MESH:
if (this->mesh_dma) {
+8 -4
View File
@@ -390,8 +390,10 @@ void HeathrowIC::feature_control(const uint32_t value)
}
}
#define FIRST_INT1_BIT 12 // The first ten are DMA, the next 2 appear to be unused. We'll map 1:1 the INT1 bits 31..12 (0x1F..0x0C) as IRQ_ID bits.
#define FIRST_INT2_BIT 2 // Skip the first two which are Ethernet DMA. We'll map INT2 bits 13..2 (interrupts 45..34 or 0x2D..0x22) as IRQ_ID bits 11..0.
#define FIRST_INT1_BIT 12 // The first ten are DMA, the next 2 appear to be unused.
// We'll map 1:1 the INT1 bits 31..12 (0x1F..0x0C) as IRQ_ID bits.
#define FIRST_INT2_BIT 2 // Skip the first two which are Ethernet DMA.
// We'll map INT2 bits 13..2 (interrupts 45..34 or 0x2D..0x22) as IRQ_ID bits 11..0.
#define FIRST_INT1_IRQ_ID_BIT 12 // Same as INT1_BIT so there won't be any shifting required.
#define FIRST_INT2_IRQ_ID_BIT 0
@@ -481,7 +483,8 @@ void HeathrowIC::ack_int(uint32_t irq_id, uint8_t irq_line_state)
IRQ_ID_TO_INT2_MASK(irq_id);
#if 0
LOG_F(INFO, "%s: native interrupt events:%08x.%08x levels:%08x.%08x change2:%08x state:%d",
this->name.c_str(), this->int_events1 + 0, this->int_events2 + 0, this->int_levels1 + 0, this->int_levels2 + 0, irq_id, irq_line_state
this->name.c_str(), this->int_events1 + 0, this->int_events2 + 0,
this->int_levels1 + 0, this->int_levels2 + 0, irq_id, irq_line_state
);
#endif
// native mode: set IRQ bits in int_events2 on a 0-to-1 transition
@@ -504,7 +507,8 @@ void HeathrowIC::ack_int(uint32_t irq_id, uint8_t irq_line_state)
// emulated mode: set IRQ bits in int_events1 on all transitions
#if 0
LOG_F(INFO, "%s: native interrupt events:%08x.%08x levels:%08x.%08x change1:%08x state:%d",
this->name.c_str(), this->int_events1 + 0, this->int_events2 + 0, this->int_levels1 + 0, this->int_levels2 + 0, irq_id, irq_line_state);
this->name.c_str(), this->int_events1 + 0, this->int_events2 + 0,
this->int_levels1 + 0, this->int_levels2 + 0, irq_id, irq_line_state);
#endif
if ((this->int_mask1 & MACIO_INT_MODE) ||
(irq_line_state && !(this->int_levels1 & irq_id))) {
+4 -1
View File
@@ -394,7 +394,10 @@ bool CharIoSocket::rcv_char_available_now()
int received = (int)recv(this->sockfd, &c, 1, 0);
if (received == -1) {
if (this->acceptfd == -1) {
//LOG_F(INFO, "socket sock read (not accepted yet) err: %s", strerror(errno)); // this happens once before accept
#if 0
LOG_F(INFO, "socket sock read (not accepted yet) err: %s",
strerror(errno)); // this happens once before accept
#endif
}
else {
LOG_F(INFO, "socket sock read err: %s", strerror(errno)); // should never happen
+3 -1
View File
@@ -275,7 +275,9 @@ void EsccChannel::write_reg(int reg_num, uint8_t value)
this->read_regs[RR0] |= RR0_SYNC_HUNT;
}
}
this->write_regs[WR3] = (this->write_regs[WR3] & (WR3_RX_ENABLE | WR3_ENTER_HUNT_MODE)) | (value & ~(WR3_RX_ENABLE | WR3_ENTER_HUNT_MODE));
this->write_regs[WR3] =
(this->write_regs[WR3] & (WR3_RX_ENABLE | WR3_ENTER_HUNT_MODE)) |
(value & ~(WR3_RX_ENABLE | WR3_ENTER_HUNT_MODE));
return;
case WR7:
if (this->write_regs[WR15] & WR15_SDLC_HDLC_ENHANCEMENT_ENABLE) {
+11 -6
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-24 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -215,7 +215,8 @@ enum
WR3_SYNC_CHARACTER_LOAD_INHIBIT = 1 << 1,
WR3_RX_ENABLE = 1 << 0,
// WR4 - Transmit/Receiver Miscellaneous Parameters and Modes // Transmit/Receive miscellaneous parameters and codes, clock rate, number of sync characters, stop bits, parity
// WR4 - Transmit/Receiver Miscellaneous Parameters and Modes
// Transmit/Receive miscellaneous parameters and codes, clock rate, number of sync characters, stop bits, parity
WR4_CLOCK_RATE = 3 << 6,
WR4_X1_CLOCK_MODE = 0 << 6,
@@ -257,7 +258,8 @@ enum
// WR8 - Transmit buffer
// WR9 - Master Interrupt Control // Master interrupt control and reset (accessed through either channel), reset bits, control interrupt daisy chain
// WR9 - Master Interrupt Control
// Master interrupt control and reset (accessed through either channel), reset bits, control interrupt daisy chain
WR9_RESET_COMMAND_BITS = 3 << 6,
WR9_NO_RESET = 0 << 6,
@@ -272,7 +274,8 @@ enum
WR9_NO_VECTOR = 1 << 1,
WR9_VECTOR_INCLUDES_STATUS = 1 << 0,
// WR10 - Miscellaneous Transmitter/Receiver Control Bits // Miscellaneous transmitter/receiver control bits, NRZI, NRZ, FM encoding, CRC reset
// WR10 - Miscellaneous Transmitter/Receiver Control Bits
// Miscellaneous transmitter/receiver control bits, NRZI, NRZ, FM encoding, CRC reset
WR10_CRC_PRESET = 1 << 7,
WR10_DATA_ENCODING = 3 << 5,
@@ -318,7 +321,8 @@ enum
// WR13 - Upper Byte of Baud Rate Generator Time Constant
// WR14 - Miscellaneous Control Bits // Miscellaneous control bits: baud rate generator, Phase-Locked Loop control, auto echo, local loopback
// WR14 - Miscellaneous Control Bits
// Miscellaneous control bits: baud rate generator, Phase-Locked Loop control, auto echo, local loopback
WR14_DPLL_COMMAND_BITS = 7 << 5,
WR14_DPLL_NULL_COMMAND = 0 << 5,
@@ -335,7 +339,8 @@ enum
WR14_BR_GENERATOR_SOURCE = 1 << 1,
WR14_BR_GENERATOR_ENABLE = 1 << 0,
// WR15 - External/Status Interrupt Control // External/Status interrupt control information-control external conditions causing interrupts
// WR15 - External/Status Interrupt Control
// External/Status interrupt control information-control external conditions causing interrupts
WR15_SDLC_HDLC_ENHANCEMENT_ENABLE = 1 << 0,
WR15_ZERO_COUNT_IE = 1 << 1,
+2 -1
View File
@@ -223,7 +223,8 @@ int SoundServer::start_out_stream()
{
if (is_deterministic) {
LOG_F(9, "Starting sound output deterministic polling.");
impl->deterministic_poll_timer = TimerManager::get_instance()->add_cyclic_timer(MSECS_TO_NSECS(10), impl->deterministic_poll_cb);
impl->deterministic_poll_timer =
TimerManager::get_instance()->add_cyclic_timer(MSECS_TO_NSECS(10), impl->deterministic_poll_cb);
return 0;
}
return cubeb_stream_start(impl->out_stream);
+3 -1
View File
@@ -70,7 +70,9 @@ enum RamdacRegs : uint8_t {
CURSOR_POS_HI = 0x10, // cursor position, high-order byte
CURSOR_POS_LO = 0x11, // cursor position, low-order byte
MISC_CTRL = 0x20, // miscellaneus control bits ; Dacula: read ; when 1MB VRAM then write (mode&15) else write (mode)
DBL_BUF_CTRL = 0x21, // double buffer control bits ; Dacula: write 4; Radical: set to 0 if using optional bank (bankb) in Open Firmware or for 2nd page in ndrv
DBL_BUF_CTRL = 0x21, // double buffer control bits ;
// - Dacula: write 4;
// - Radical: set to 0 if using optional bank (bankb) in Open Firmware or for 2nd page in ndrv
TEST_CTRL = 0x22, // enable/disable DAC tests ; Dacula: write 0
// multipurpose section registers (DACula only)
+2 -1
View File
@@ -398,7 +398,8 @@ void ATIRage::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size) {
if (bit_changed(old_value, new_value, ATI_CRTC_ENABLE)
|| extract_bits(old_value, ATI_CRTC_PIX_WIDTH, ATI_CRTC_PIX_WIDTH_size) != extract_bits(new_value, ATI_CRTC_PIX_WIDTH, ATI_CRTC_PIX_WIDTH_size)
|| extract_bits(old_value, ATI_CRTC_PIX_WIDTH, ATI_CRTC_PIX_WIDTH_size) !=
extract_bits(new_value, ATI_CRTC_PIX_WIDTH, ATI_CRTC_PIX_WIDTH_size)
) {
draw_fb = true;
if (bit_set(new_value, ATI_CRTC_ENABLE) &&
+10 -5
View File
@@ -93,22 +93,26 @@ uint16_t Sixty6Video::iodev_read(uint32_t address)
last_control_1_count++;
} else {
if (last_control_1_count) {
LOG_F(SIXTY6_INTERRUPT, "Sixty6: read %d:CONTROL_1 = %02x x %d", address, last_control_1_value, last_control_1_count);
LOG_F(SIXTY6_INTERRUPT, "Sixty6: read %d:CONTROL_1 = %02x x %d",
address, last_control_1_value, last_control_1_count);
}
last_control_1_value = value;
last_control_1_count = 0;
LOG_F(SIXTY6_INTERRUPT, "Sixty6: read %d:CONTROL_1 = %02x x %d", address, last_control_1_value, last_control_1_count);
LOG_F(SIXTY6_INTERRUPT, "Sixty6: read %d:CONTROL_1 = %02x x %d",
address, last_control_1_value, last_control_1_count);
}
break;
default:
value = 0;
LOG_F(ERROR, "Sixty6: read %d:CONTROL_DATA 0x%02x = %02x", address, this->control_addr, value);
LOG_F(ERROR, "Sixty6: read %d:CONTROL_DATA 0x%02x = %02x",
address, this->control_addr, value);
}
break;
case Sixty6BaseReg::CONTROL_ADDR:
value = this->control_addr;
LOG_F(SIXTY6_INTERRUPT, "Sixty6: read %d:CONTROL_ADDR = %02x", address, value);
LOG_F(SIXTY6_INTERRUPT, "Sixty6: read %d:CONTROL_ADDR = %02x",
address, value);
break;
}
return value;
@@ -412,7 +416,8 @@ int Sixty6Video::device_postinit()
this->control_1 |= 0x80;
else
this->control_1 &= ~0x80;
LOG_F(SIXTY6_INTERRUPT, "Sixty6: interrupt state:%d doit:%d", irq_line_state, ((this->control_1 & 0x40) && this->crtc_on));
LOG_F(SIXTY6_INTERRUPT, "Sixty6: interrupt state:%d doit:%d",
irq_line_state, ((this->control_1 & 0x40) && this->crtc_on));
if (this->interrupt_enabled && this->crtc_on) {
//this->pci_interrupt(irq_line_state);
+10 -6
View File
@@ -60,7 +60,7 @@ typedef struct {
uint32_t ow_expected_checksum;
uint32_t nw_product_id;
uint32_t nw_subconfig_expected_checksum; // checksum of the system config section but without the firmware version and date
const char *id_str; // Bootstrap string located at offset 0x30D064 (PCI Macs) or 0x30C064 (Nubus Macs) to machine name and description.
const char *id_str; // Bootstrap string located at offset 0x30D064 (PCI Macs) or 0x30C064 (Nubus Macs)
const char *nw_firmware_updater_name;
const char *nw_openfirmware_name;
const char *dppc_machine;
@@ -788,10 +788,13 @@ string MachineFactory::machine_name_from_rom(char *rom_data, size_t rom_size) {
(info->nw_product_id && info->nw_product_id == nw_product_id )
) {
int match_count = 1
+ (info->ow_expected_checksum && info->ow_expected_checksum == ow_checksum_stored )
+ (info->ow_expected_checksum && info->ow_expected_checksum == ow_checksum_calculated )
+ (info->nw_subconfig_expected_checksum && info->nw_subconfig_expected_checksum == nw_subconfig_checksum_calculated )
+ (info->id_str && strcmp(rom_id_str, info->id_str) == 0)
+ (info->ow_expected_checksum
&& info->ow_expected_checksum == ow_checksum_stored)
+ (info->ow_expected_checksum
&& info->ow_expected_checksum == ow_checksum_calculated)
+ (info->nw_subconfig_expected_checksum
&& info->nw_subconfig_expected_checksum == nw_subconfig_checksum_calculated)
+ (info->id_str && strcmp(rom_id_str, info->id_str) == 0)
;
if (!match_pass) {
@@ -870,7 +873,8 @@ string MachineFactory::machine_name_from_rom(char *rom_data, size_t rom_size) {
if (firmware_version < 0xffff)
LOG_F(INFO, " ROM Version: %x.%03x", (firmware_version >> 12) & 15, firmware_version & 0xfff);
else
LOG_F(INFO, " ROM Version: %x.%x.%03x", firmware_version >> 16, (firmware_version >> 12) & 15, firmware_version & 0xfff);
LOG_F(INFO, " ROM Version: %x.%x.%03x",
firmware_version >> 16, (firmware_version >> 12) & 15, firmware_version & 0xfff);
if (has_nw_config) {
LOG_F(INFO, " Product ID: 0x%04x.%02x 0x%08x = %s%d,%d",
nw_product_id >> 8, nw_product_id & 0xff,
+4 -1
View File
@@ -90,7 +90,10 @@ public:
const WorkingDirectoryValidator WorkingDirectory;
void run_machine(std::string machine_str, char *rom_data, size_t rom_size, uint32_t execution_mode, uint32_t profiling_interval_ms);
void run_machine(
std::string machine_str, char *rom_data, size_t rom_size, uint32_t execution_mode,
uint32_t profiling_interval_ms
);
int main(int argc, char** argv) {