Remove superfluous semicolons.

This commit is contained in:
joevt
2025-06-27 05:38:46 -07:00
committed by dingusdev
parent 3f830eb5b5
commit 5412fbc198
59 changed files with 220 additions and 220 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ public:
event_manager = new EventManager();
}
return event_manager;
};
}
void poll_events();
void set_keyboard_locale(uint32_t keyboard_id);
@@ -171,7 +171,7 @@ public:
private:
static EventManager* event_manager;
EventManager() {}; // private constructor to implement a singleton
EventManager() {} // private constructor to implement a singleton
CoreSignal<const WindowEvent&> _window_signal;
CoreSignal<const MouseEvent&> _mouse_signal;
+8 -8
View File
@@ -64,13 +64,13 @@ public:
return true;
}
return false;
};
}
void push(T val)
{
std::lock_guard<std::recursive_mutex> lk(mtx);
std::priority_queue<T, Container, Compare>::push(val);
};
}
T pop()
{
@@ -78,7 +78,7 @@ public:
T val = std::priority_queue<T, Container, Compare>::top();
std::priority_queue<T, Container, Compare>::pop();
return val;
};
}
std::recursive_mutex& get_mtx()
{
@@ -111,20 +111,20 @@ public:
timer_manager = new TimerManager();
}
return timer_manager;
};
}
// callback for retrieving current time
void set_time_now_cb(const std::function<uint64_t()> &cb) {
this->get_time_now = cb;
};
}
// callback for acknowledging time changes
void set_notify_changes_cb(const timer_cb &cb) {
this->notify_timer_changes = cb;
};
}
// return current virtual time in nanoseconds
uint64_t current_time_ns() { return get_time_now(); };
uint64_t current_time_ns() { return get_time_now(); }
// creating and cancelling timers
uint32_t add_oneshot_timer(uint64_t timeout, timer_cb cb);
@@ -137,7 +137,7 @@ public:
private:
static TimerManager* timer_manager;
TimerManager(){}; // private constructor to implement a singleton
TimerManager(){} // private constructor to implement a singleton
// timer queue
my_priority_queue<std::shared_ptr<TimerInfo>, std::vector<std::shared_ptr<TimerInfo>>, MyGtComparator> timer_queue;
+4 -4
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)
@@ -118,7 +118,7 @@ std::unordered_map<uint32_t, uint64_t> num_opcodes;
class CPUProfile : public BaseProfile {
public:
CPUProfile() : BaseProfile("PPC_CPU") {};
CPUProfile() : BaseProfile("PPC_CPU") {}
void populate_variables(std::vector<ProfileVar>& vars) {
vars.clear();
@@ -169,7 +169,7 @@ public:
.count_total = num_executed_instrs});
}
#endif
};
}
void reset() {
num_executed_instrs = 0;
@@ -180,7 +180,7 @@ public:
#ifdef CPU_PROFILING_OPS
num_opcodes.clear();
#endif
};
}
};
#endif
+7 -7
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)
@@ -1340,7 +1340,7 @@ template void write_unaligned<uint64_t>(uint32_t opcode, uint32_t guest_va, uint
class MMUProfile : public BaseProfile {
public:
MMUProfile() : BaseProfile("PPC_MMU") {};
MMUProfile() : BaseProfile("PPC_MMU") {}
void populate_variables(std::vector<ProfileVar>& vars) {
vars.clear();
@@ -1388,7 +1388,7 @@ public:
vars.push_back({.name = "Unaligned Crosspage Writes Total",
.format = ProfileVarFmt::DEC,
.value = unaligned_crossp_w});
};
}
void reset() {
dmem_reads_total = 0;
@@ -1402,7 +1402,7 @@ public:
unaligned_writes = 0;
unaligned_crossp_r = 0;
unaligned_crossp_w = 0;
};
}
};
#endif
@@ -1414,7 +1414,7 @@ public:
class TLBProfile : public BaseProfile {
public:
TLBProfile() : BaseProfile("PPC:MMU:TLB") {};
TLBProfile() : BaseProfile("PPC:MMU:TLB") {}
void populate_variables(std::vector<ProfileVar>& vars) {
vars.clear();
@@ -1446,14 +1446,14 @@ public:
vars.push_back({.name = "Number of replaced TLB entries",
.format = ProfileVarFmt::DEC,
.value = num_entry_replacements});
};
}
void reset() {
num_primary_dtlb_hits = 0;
num_secondary_dtlb_hits = 0;
num_dtlb_refills = 0;
num_entry_replacements = 0;
};
}
};
#endif
+2 -2
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-21 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -31,7 +31,7 @@ public:
debugger_obj = std::unique_ptr<DppcDebugger>(new DppcDebugger());
}
return debugger_obj.get();
};
}
void enter_debugger();
+7 -7
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)
@@ -55,7 +55,7 @@ public:
void register_device(AdbDevice* dev_obj);
uint8_t process_command(const uint8_t* in_data, int data_size);
uint8_t get_output_count() { return this->output_count; };
uint8_t get_output_count() { return this->output_count; }
// Polls devices that have a service request flag set. Returns the talk
// command corresponding to the first device that responded with data, or
@@ -63,11 +63,11 @@ public:
uint8_t poll();
// callbacks meant to be called by devices
const uint8_t* get_input_buf() { return this->input_buf; };
uint8_t* get_output_buf() { return this->output_buf; };
uint8_t get_input_count() { return this->input_count; };
void set_output_count(uint8_t count) { this->output_count = count; };
bool already_answered() { return this->got_answer; };
const uint8_t* get_input_buf() { return this->input_buf; }
uint8_t* get_output_buf() { return this->output_buf; }
uint8_t get_input_count() { return this->input_count; }
void set_output_count(uint8_t count) { this->output_count = count; }
bool already_answered() { return this->got_answer; }
private:
std::vector<AdbDevice*> devices;
+2 -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)
@@ -37,7 +37,7 @@ int AdbDevice::device_postinit() {
this->host_obj->register_device(this);
return 0;
};
}
uint8_t AdbDevice::poll() {
if (!this->srq_flag) {
+9 -9
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)
@@ -47,7 +47,7 @@ public:
virtual void reset() = 0;
virtual bool talk(const uint8_t dev_addr, const uint8_t reg_num);
virtual void listen(const uint8_t dev_addr, const uint8_t reg_num);
virtual uint8_t get_address() { return this->my_addr; };
virtual uint8_t get_address() { return this->my_addr; }
// Attempts to poll the device. Returns the talk command corresponding to
// the device if it has data, 0 otherwise.
@@ -56,15 +56,15 @@ public:
protected:
uint8_t gen_random_address();
virtual bool get_register_0() { return false; };
virtual bool get_register_1() { return false; };
virtual bool get_register_2() { return false; };
virtual bool get_register_0() { return false; }
virtual bool get_register_1() { return false; }
virtual bool get_register_2() { return false; }
virtual bool get_register_3();
virtual void set_register_0() {};
virtual void set_register_1() {};
virtual void set_register_2() {};
virtual void set_register_3() {};
virtual void set_register_0() {}
virtual void set_register_1() {}
virtual void set_register_2() {}
virtual void set_register_3() {}
uint8_t exc_event_flag = 0;
uint8_t srq_flag = 0;
+3 -3
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)
@@ -43,7 +43,7 @@ public:
void set_host(IdeChannel* host, uint8_t dev_id) {
this->host_obj = host;
this->my_dev_id = dev_id;
};
}
uint16_t read(const uint8_t reg_addr) override;
void write(const uint8_t reg_addr, const uint16_t value) override;
@@ -54,7 +54,7 @@ public:
void pdiag_callback() override {
this->r_error &= 0x7F;
};
}
virtual void device_reset(bool is_soft_reset);
virtual void device_set_signature();
+6 -6
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)
@@ -151,7 +151,7 @@ enum ATA_Cmd : uint8_t {
SET_FEATURES = 0xEF,
};
}; // namespace ata_interface
} // namespace ata_interface
/** Interface for ATA devices. */
class AtaInterface {
@@ -162,7 +162,7 @@ public:
virtual void write(const uint8_t reg_addr, const uint16_t val) = 0;
virtual int get_device_id() = 0;
virtual void pdiag_callback() {};
virtual void pdiag_callback() {}
};
/** Dummy ATA device. */
@@ -178,12 +178,12 @@ public:
// to prevent the software from waiting for a long time
// for empty slots
return 0xFF7FU;
};
}
void write(const uint8_t reg_addr, const uint16_t val) override {};
void write(const uint8_t reg_addr, const uint16_t val) override {}
// invalid device ID means no real device is present
int get_device_id() override { return ata_interface::DEVICE_ID_INVALID; };
int get_device_id() override { return ata_interface::DEVICE_ID_INVALID; }
};
#endif // ATA_INTERFACE_H
+2 -2
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)
@@ -139,7 +139,7 @@ bool CmdIdeCtrl::pci_io_write(uint32_t offset, uint32_t value, uint32_t size) {
return false;
return true;
};
}
uint8_t CmdIdeCtrl::read_config_reg(uint32_t reg_offset) {
switch(reg_offset) {
+2 -2
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)
@@ -74,7 +74,7 @@ private:
class MacioIdeChannel : public IdeChannel
{
public:
MacioIdeChannel(const std::string name) : IdeChannel(name) {};
MacioIdeChannel(const std::string name) : IdeChannel(name) {}
~MacioIdeChannel() = default;
static std::unique_ptr<HWComponent> create_first() {
+2 -2
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)
@@ -47,7 +47,7 @@ enum AthensRegs: uint8_t {
P1 = 7
};
}; // namespace AthensRegs
} // namespace AthensRegs
class AthensClocks : public I2CDevice, public HWComponent
{
+2 -2
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)
@@ -99,7 +99,7 @@ namespace DBDMA_Cmd {
NOP = 6,
STOP = 7
};
};
}
typedef std::function<void(void)> DbdmaCallback;
+6 -6
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)
@@ -63,22 +63,22 @@ public:
virtual std::string get_name(void) {
return this->name;
};
}
virtual void set_name(std::string name) {
this->name = name;
};
}
virtual bool supports_type(HWCompType type) {
return !!(this->supported_types & type);
};
}
virtual void supports_types(uint64_t types) {
this->supported_types = types;
};
}
virtual int device_postinit() {
return 0;
};
}
protected:
std::string name;
+7 -7
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)
@@ -48,7 +48,7 @@ class I2CBus {
public:
I2CBus() {
std::memset(this->dev_list, 0, sizeof(this->dev_list));
};
}
virtual ~I2CBus() = default;
virtual void register_device(uint8_t dev_addr, I2CDevice* dev_obj) {
@@ -57,7 +57,7 @@ public:
}
this->dev_list[dev_addr] = dev_obj;
LOG_F(INFO, "New I2C device, address = 0x%X", dev_addr);
};
}
virtual bool start_transaction(uint8_t dev_addr) {
if (this->dev_list[dev_addr]) {
@@ -66,28 +66,28 @@ public:
} else {
return false;
}
};
}
virtual bool send_subaddress(uint8_t dev_addr, uint8_t sub_addr) {
if (!this->dev_list[dev_addr]) {
return false; /* no device -> no acknowledge */
}
return this->dev_list[dev_addr]->send_subaddress(sub_addr);
};
}
virtual bool send_byte(uint8_t dev_addr, uint8_t data) {
if (!this->dev_list[dev_addr]) {
return false; /* no device -> no acknowledge */
}
return this->dev_list[dev_addr]->send_byte(data);
};
}
virtual bool receive_byte(uint8_t dev_addr, uint8_t* p_data) {
if (!this->dev_list[dev_addr]) {
return false; /* no device -> no acknowledge */
}
return this->dev_list[dev_addr]->receive_byte(p_data);
};
}
protected:
I2CDevice* dev_list[128]; /* list of registered I2C devices */
+5 -5
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -54,17 +54,17 @@ void I2CProm::set_memory(int start, const uint8_t* in_data, int size)
void I2CProm::start_transaction() {
this->pos = 0;
};
}
bool I2CProm::send_subaddress(uint8_t sub_addr) {
this->pos = sub_addr;
return true;
};
}
bool I2CProm::send_byte(uint8_t data) {
LOG_F(9, "I2CRom: 0x%X received", data);
return true;
};
}
bool I2CProm::receive_byte(uint8_t* p_data) {
if (this->pos >= this->rom_size) {
@@ -72,4 +72,4 @@ bool I2CProm::receive_byte(uint8_t* p_data) {
}
*p_data = this->data[this->pos++];
return true;
};
}
+2 -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)
@@ -87,7 +87,7 @@ public:
// Old World implementation
class OfConfigAppl : public OfConfigImpl {
public:
OfConfigAppl(NVram* nvram_obj) { this->nvram_obj = nvram_obj; };
OfConfigAppl(NVram* nvram_obj) { this->nvram_obj = nvram_obj; }
~OfConfigAppl() = default;
bool validate();
+7 -7
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)
@@ -71,7 +71,7 @@ enum {
*/
class BanditHost : public PCIHost, public MMIODevice {
public:
BanditHost(int bridge_num) { this->bridge_num = bridge_num; };
BanditHost(int bridge_num) { this->bridge_num = bridge_num; }
// MMIODevice methods
uint32_t read(uint32_t rgn_start, uint32_t offset, int size) override;
@@ -121,15 +121,15 @@ public:
static std::unique_ptr<HWComponent> create_first() {
return std::unique_ptr<Bandit>(new Bandit(1, "Bandit-PCI1"));
};
}
static std::unique_ptr<HWComponent> create_second() {
return std::unique_ptr<Bandit>(new Bandit(2, "Bandit-PCI2"));
};
}
static std::unique_ptr<HWComponent> create_psx_first() {
return std::unique_ptr<Bandit>(new Bandit(1, "PSX-PCI1", 8, 0));
};
}
private:
std::unique_ptr<BanditPciDevice> my_pci_device;
@@ -146,7 +146,7 @@ public:
static std::unique_ptr<HWComponent> create() {
return std::unique_ptr<Chaos>(new Chaos("VCI0"));
};
}
};
/**
@@ -159,7 +159,7 @@ public:
static std::unique_ptr<HWComponent> create() {
return std::unique_ptr<AspenPci>(new AspenPci("Aspen-PCI1"));
};
}
};
#endif // BANDIT_PCI_H
+2 -2
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)
@@ -57,7 +57,7 @@ PCIBase::PCIBase(std::string name, PCIHeaderType hdr_type, int num_bars)
this->pci_wr_cache_lnsz = [this](uint8_t val) { this->cache_ln_sz = val; };
this->pci_notify_bar_change = [](int bar_num) {};
};
}
uint32_t PCIBase::pci_cfg_read(uint32_t reg_offs, AccessDetails &details)
{
+4 -4
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)
@@ -86,16 +86,16 @@ public:
virtual bool supports_io_space() {
return has_io_space;
};
}
/* I/O space access methods */
virtual bool pci_io_read(uint32_t offset, uint32_t size, uint32_t* res) {
return false;
};
}
virtual bool pci_io_write(uint32_t offset, uint32_t value, uint32_t size) {
return false;
};
}
// configuration space access methods
virtual uint32_t pci_cfg_read(uint32_t reg_offs, AccessDetails &details);
+2 -2
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)
@@ -94,7 +94,7 @@ PCIBridge::PCIBridge(std::string name) : PCIBridgeBase(name, PCI_HEADER_TYPE_1,
this->pref_mem_limit_64 = (((uint64_t)this->pref_limit_upper32 << 32) |
((this->pref_mem_limit & 0xfff0) << 16)) + 0x100000;
};
};
}
uint32_t PCIBridge::pci_cfg_read(uint32_t reg_offs, AccessDetails &details)
{
+1 -1
View File
@@ -40,7 +40,7 @@ PCIBridgeBase::PCIBridgeBase(std::string name, PCIHeaderType hdr_type, int num_b
};
this->pci_wr_sec_status = [this](uint16_t val) {};
this->pci_wr_bridge_control = [this](uint16_t val) { this->bridge_control = val; };
};
}
AddressMapEntry* PCIBridgeBase::pci_register_mmio_region(uint32_t start_addr, uint32_t size, PCIBase* obj)
{
+1 -1
View File
@@ -52,7 +52,7 @@ public:
bool supports_io_space() override {
return true;
};
}
// plugin interface for using in the derived classes
std::function<uint8_t()> pci_rd_primary_bus;
+2 -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)
@@ -126,7 +126,7 @@ PCICardbusBridge::PCICardbusBridge(std::string name) : PCIBridgeBase(name, PCI_H
this->io_limit_1 = (val & this->io_1_cfg);
this->io_limit_1_32 = this->io_limit_1 + 4;
};
};
}
uint32_t PCICardbusBridge::pci_cfg_read(uint32_t reg_offs, AccessDetails &details)
{
+2 -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)
@@ -29,7 +29,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
PCIDevice::PCIDevice(std::string name) : PCIBase(name, PCI_HEADER_TYPE_0, 6)
{
};
}
uint32_t PCIDevice::pci_cfg_read(uint32_t reg_offs, AccessDetails &details)
{
+3 -3
View File
@@ -65,7 +65,7 @@ public:
PCIHost() {
this->dev_map.clear();
io_space_devs.clear();
};
}
~PCIHost() = default;
virtual bool pci_register_device(int dev_fun_num, PCIBase* dev_instance);
@@ -89,13 +89,13 @@ public:
virtual void set_irq_map(const std::vector<PciIrqMap> &irq_map) {
this->my_irq_map = irq_map;
};
}
virtual int pcihost_device_postinit();
virtual bool register_pci_int(PCIBase* dev_instance);
virtual void set_interrupt_controller(InterruptCtrl * int_ctrl_obj) {
this->int_ctrl = int_ctrl_obj;
};
}
virtual InterruptCtrl *get_interrupt_controller();
protected:
+5 -5
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)
@@ -91,7 +91,7 @@ namespace MeshScsi {
INT_ERROR = 1 << 2,
INT_MASK = INT_CMD_DONE | INT_EXCEPTION | INT_ERROR
};
}; // namespace MeshScsi
} // namespace MeshScsi
class MeshBase {
public:
@@ -107,8 +107,8 @@ public:
~MeshStub() = default;
// registers access
uint8_t read(uint8_t reg_offset) override { return 0; };
void write(uint8_t reg_offset, uint8_t value) override {};
uint8_t read(uint8_t reg_offset) override { return 0; }
void write(uint8_t reg_offset, uint8_t value) override {}
};
class MeshController : public ScsiBusController, public MeshBase {
@@ -116,7 +116,7 @@ public:
MeshController(uint8_t mesh_id) : ScsiBusController("MESH", 7) {
this->chip_id = mesh_id;
this->reset(true);
};
}
~MeshController() = default;
static std::unique_ptr<HWComponent> create_for_tnt() {
+9 -9
View File
@@ -58,7 +58,7 @@ namespace Read {
Xfer_Cnt_Hi = 0xE, // Current Transfer Count Register High ; Am53CF94 extension
//
};
};
}
/** 53C94 write registers */
namespace Write {
@@ -80,7 +80,7 @@ namespace Write {
Xfer_Cnt_Hi = 0xE, // Start Transfer Count Register High ; Am53CF94 extension
Data_Align = 0xF, // Data Alignment Register
};
};
}
/** NCR53C94/Am53CF94 commands. */
enum {
@@ -180,7 +180,7 @@ namespace SeqState {
RCV_STATUS,
RCV_MESSAGE,
};
};
}
constexpr auto DATA_FIFO_MAX = 16;
@@ -228,7 +228,7 @@ public:
std::bind(&Sc53C94::dma_stop, this)
);
}
};
}
void set_drq_callback(DrqCb cb) {
this->drq_cb = cb;
@@ -236,18 +236,18 @@ public:
// ScsiDevice methods
void notify(ScsiNotification notif_type, int param) override;
bool prepare_data() override { return false; };
bool get_more_data() override { return false; };
bool has_data() override { return this->data_fifo_pos != 0; };
bool prepare_data() override { return false; }
bool get_more_data() override { return false; }
bool has_data() override { return this->data_fifo_pos != 0; }
int send_data(uint8_t* dst_ptr, int count) override;
void process_command() override {};
void process_command() override {}
// DmaDevice methods
int xfer_from(uint8_t *buf, int len) override;
int xfer_to(uint8_t *buf, int len) override;
int tell_xfer_size() override {
return this->xfer_count;
};
}
protected:
void reset_device();
+7 -7
View File
@@ -62,7 +62,7 @@ namespace ScsiPhase {
MESSAGE_OUT,
RESET,
};
};
}
/** SCSI status codes. */
namespace ScsiStatus {
@@ -70,7 +70,7 @@ namespace ScsiStatus {
GOOD = 0,
CHECK_CONDITION = 2,
};
};
}
/** Standard message codes. */
namespace ScsiMessage {
@@ -83,7 +83,7 @@ namespace ScsiMessage {
HAS_DISCONNECT_PRIVILEDGE = 0x40,
IDENTIFY = 0x80,
};
};
}
/** Extended message codes. */
namespace ScsiExtMessage {
@@ -92,7 +92,7 @@ namespace ScsiExtMessage {
SYNCH_XFER_REQ = 1,
WIDE_XFER_REQ = 3,
};
};
}
/** Internal notification codes for our SCSI implementation. */
enum ScsiNotification : int {
@@ -187,7 +187,7 @@ public:
this->scsi_id = my_id;
this->lun = 0,
this->cur_phase = ScsiPhase::BUS_FREE;
};
}
~ScsiDevice() = default;
virtual void notify(ScsiNotification notif_type, int param);
@@ -196,7 +196,7 @@ public:
virtual void switch_phase(const int new_phase);
virtual bool allow_phase_change();
virtual bool has_data() { return this->data_size != 0; };
virtual bool has_data() { return this->data_size != 0; }
virtual int xfer_data();
virtual int send_data(uint8_t* dst_ptr, int count);
virtual int rcv_data(const uint8_t* src_ptr, const int count);
@@ -281,7 +281,7 @@ public:
uint16_t test_ctrl_lines(uint16_t mask);
// reading/writing data lines
uint8_t get_data_lines() { return this->data_lines; };
uint8_t get_data_lines() { return this->data_lines; }
// high-level control/status
int switch_phase(int id, int new_phase);
+5 -5
View File
@@ -50,7 +50,7 @@ namespace Scsi_Bus_Controller {
RCV_STATUS,
RCV_MESSAGE,
};
};
}
/** Sequencer error codes. */
enum : int {
@@ -75,12 +75,12 @@ public:
// ScsiDevice methods
void notify(ScsiNotification notif_type, int param) override;
bool prepare_data() override { return false; };
bool get_more_data() override { return false; };
bool has_data() override { return false; };
bool prepare_data() override { return false; }
bool get_more_data() override { return false; }
bool has_data() override { return false; }
bool rcv_data();
int send_data(uint8_t* dst_ptr, int count) override;
void process_command() override {};
void process_command() override {}
// DmaDevice methods
int xfer_from(uint8_t *buf, int len) override;
+2 -2
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)
@@ -39,7 +39,7 @@ public:
void insert_image(std::string filename);
void process_command();
bool prepare_data();
bool get_more_data() { return false; };
bool get_more_data() { return false; }
protected:
int test_unit_ready();
+2 -2
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)
@@ -79,7 +79,7 @@ namespace MaceEnet {
IAC_ADDRCHG = 1 << 7
};
}; // namespace MaceEnet
} // namespace MaceEnet
class MaceController : public DmaDevice, public HWComponent {
public:
+2 -2
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -161,6 +161,6 @@ private:
std::unique_ptr<char[]> disk_data;
};
}; // namespace MacSuperdrive
} // namespace MacSuperdrive
#endif // MAC_SUPERDRIVE_H
+2 -2
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -98,7 +98,7 @@ int Swim3Ctrl::device_postinit()
}
return 0;
};
}
uint8_t Swim3Ctrl::read(uint8_t reg_offset)
{
+3 -3
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-21 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -100,7 +100,7 @@ public:
void set_dma_channel(DmaBidirChannel *dma_ch) {
this->dma_ch = dma_ch;
};
}
protected:
void reset();
@@ -151,6 +151,6 @@ private:
uint8_t irq = 0;
};
}; // namespace Swim3
} // namespace Swim3
#endif // SWIM3_H
+2 -2
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)
@@ -823,7 +823,7 @@ DmaPullResult AmicSerialXmitDma::pull_data(uint32_t req_len, uint32_t *avail_len
uint8_t **p_data)
{
return DmaPullResult::NoMoreData;
};
}
static std::vector<std::string> Amic_Subdevices = {
"Sc53C94", "Escc", "Mace", "ViaCuda", "Swim3"
+8 -8
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)
@@ -106,19 +106,19 @@ public:
~AmicSndOutDma() = default;
void init(uint32_t buf_base, uint32_t buf_samples);
void enable() { this->enabled = true; };
void disable() { this->enabled = false; };
void enable() { this->enabled = true; }
void disable() { this->enabled = false; }
uint8_t read_stat();
void update_irq();
void write_dma_out_ctrl(uint8_t value);
uint32_t get_cur_buf_pos() { return this->cur_buf_pos; };
uint32_t get_cur_buf_pos() { return this->cur_buf_pos; }
DmaPullResult pull_data(uint32_t req_len, uint32_t *avail_len,
uint8_t **p_data);
void init_interrupts(InterruptCtrl *int_ctrl, uint64_t irq_id) {
this->int_ctrl = int_ctrl;
this->snd_dma_irq_id = irq_id;
};
}
private:
bool enabled = false;
@@ -144,7 +144,7 @@ public:
void reinit(const uint32_t addr_ptr, const uint16_t byte_cnt);
void reset(const uint32_t addr_ptr);
void write_ctrl(const uint8_t value);
uint8_t read_stat() { return this->stat; };
uint8_t read_stat() { return this->stat; }
int push_data(const char* src_ptr, int len);
DmaPullResult pull_data(uint32_t req_len, uint32_t *avail_len,
@@ -163,7 +163,7 @@ public:
~AmicSerialXmitDma() = default;
void write_ctrl(const uint8_t value);
uint8_t read_stat() { return this->stat; };
uint8_t read_stat() { return this->stat; }
DmaPullResult pull_data(uint32_t req_len, uint32_t *avail_len,
uint8_t **p_data);
@@ -183,7 +183,7 @@ public:
void reinit(const uint32_t addr_ptr);
void reset(const uint32_t addr_ptr);
void write_ctrl(const uint8_t value);
uint8_t read_stat() { return this->stat; };
uint8_t read_stat() { return this->stat; }
void xfer_to_device();
void xfer_from_device();
+4 -4
View File
@@ -101,7 +101,7 @@ namespace Hammerhead {
BANK_25_BASE_LSB = 0x4F0,
};
}; // namespace Hammerhead
} // namespace Hammerhead
class HammerheadCtrl : public MemCtrlBase, public MMIODevice {
public:
@@ -118,15 +118,15 @@ public:
void set_motherboard_id(const uint8_t val) {
this->mb_id = val & 7;
};
}
void set_rom_type(const uint8_t val) {
this->rom_type = val & 1;
};
}
void set_bus_speed(const uint8_t val) {
this->bus_speed = val & 7;
};
}
void insert_ram_dimm(int slot_num, uint32_t capacity);
void map_phys_ram();
+4 -4
View File
@@ -48,22 +48,22 @@ static std::string get_type_str(uint32_t type) {
if (str.length())
str += ",";
str += "ROM";
};
}
if (type & RT_RAM) {
if (str.length())
str += ",";
str += "RAM";
};
}
if (type & RT_MMIO) {
if (str.length())
str += ",";
str += "MMIO";
};
}
if (type & RT_MIRROR) {
if (str.length())
str += ",";
str += "MIRROR";
};
}
return str;
}
+2 -2
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)
@@ -295,7 +295,7 @@ enum {
constexpr auto VRAM_REGION_BASE = 0xF1000000UL;
constexpr auto PLATINUM_IOREG_BASE = 0xF8000000UL;
}; // namespace Platinum
} // namespace Platinum
class PlatinumCtrl : public MemCtrlBase, public VideoCtrlBase, public MMIODevice {
public:
+3 -3
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -47,7 +47,7 @@ namespace PsxReg {
Page5_Mapping = 12,
Bus_Timeout = 13
};
}; // namespace PsxReg
} // namespace PsxReg
/** Bus (aka CPU) speed constants. */
enum {
@@ -64,7 +64,7 @@ public:
static std::unique_ptr<HWComponent> create() {
return std::unique_ptr<PsxCtrl>(new PsxCtrl(1, "PSX-PCI1"));
};
}
// MMIODevice methods
uint32_t read(uint32_t rgn_start, uint32_t offset, int size);
+7 -7
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-21 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -64,7 +64,7 @@ public:
this->dev_addr = addr;
this->pos = 0;
supports_types(HWCompType::RAM);
};
}
~SpdSdram168() = default;
@@ -109,22 +109,22 @@ public:
throw std::invalid_argument(std::string("Unsupported capacity!"));
}
LOG_F(INFO, "SDRAM capacity set to %dMB, I2C addr = 0x%X", capacity_megs, this->dev_addr);
};
}
void start_transaction() {
this->pos = 0;
};
}
bool send_subaddress(uint8_t sub_addr) {
this->pos = sub_addr;
LOG_F(9, "SDRAM subaddress set to 0x%X", sub_addr);
return true;
};
}
bool send_byte(uint8_t data) {
LOG_F(9, "SDRAM byte 0x%X received", data);
return true;
};
}
bool receive_byte(uint8_t* p_data) {
if (this->pos >= this->eeprom_data[0]) {
@@ -133,7 +133,7 @@ public:
LOG_F(9, "SDRAM sending EEPROM byte 0x%X", this->eeprom_data[this->pos]);
*p_data = this->eeprom_data[this->pos++];
return true;
};
}
private:
uint8_t dev_addr; /* I2C address */
+2 -2
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)
@@ -313,7 +313,7 @@ CharIoSocket::CharIoSocket()
LOG_F(INFO, "socket listen %d", sockfd);
} while (0);
};
}
CharIoSocket::~CharIoSocket() {
+4 -4
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -44,8 +44,8 @@ public:
CharIoBackEnd() = default;
virtual ~CharIoBackEnd() = default;
virtual int rcv_enable() { return 0; };
virtual void rcv_disable() {};
virtual int rcv_enable() { return 0; }
virtual void rcv_disable() {}
virtual bool rcv_char_available() = 0;
virtual bool rcv_char_available_now() = 0;
virtual int xmit_char(uint8_t c) = 0;
@@ -67,7 +67,7 @@ public:
/** Stdin character I/O backend. */
class CharIoStdin : public CharIoBackEnd {
public:
CharIoStdin() { this->stdio_inited = false; };
CharIoStdin() { this->stdio_inited = false; }
~CharIoStdin() = default;
int rcv_enable();
+4 -4
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -72,7 +72,7 @@ enum DpllMode : uint8_t {
/** ESCC Channel class. */
class EsccChannel {
public:
EsccChannel(std::string name) { this->name = name; };
EsccChannel(std::string name) { this->name = name; }
~EsccChannel() = default;
void attach_backend(int id);
@@ -113,7 +113,7 @@ public:
break;
}
}
};
}
private:
uint32_t timer_id_tx = 0;
@@ -166,7 +166,7 @@ public:
case 0: ch_a->set_dma_channel(ch_dir_index & 1, dma_ch); break;
case 1: ch_b->set_dma_channel(ch_dir_index & 1, dma_ch); break;
}
};
}
private:
void reset();
+8 -8
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)
@@ -47,11 +47,11 @@ public:
void set_dma_out(DmaOutChannel *dma_out_ch) {
this->dma_out_ch = dma_out_ch;
};
}
void set_dma_in(DmaInChannel *dma_in_ch) {
this->dma_in_ch = dma_in_ch;
};
}
void set_sample_rate(int sr_id);
void dma_out_start();
@@ -115,7 +115,7 @@ public:
void start_transaction() {
this->pos = 0;
};
}
bool send_subaddress(uint8_t sub_addr) {
if ((sub_addr & 0xF) > 6)
@@ -127,7 +127,7 @@ public:
this->sub_addr, this->auto_inc);
this->pos++;
return true;
};
}
bool send_byte(uint8_t data) {
if (!this->pos) {
@@ -142,13 +142,13 @@ public:
} else {
return false; // invalid sub_addr -> no acknowledge
}
};
}
bool receive_byte(uint8_t* p_data) {
*p_data = this->regs[this->sub_addr];
LOG_F(9, "TDA7433 byte 0x%X sent", *p_data);
return true;
};
}
private:
uint8_t regs[7] = {}; // control registers, see TDA7433 datasheet
@@ -160,7 +160,7 @@ private:
/** Sound codec interface with the typical MacIO access. */
class MacioSndCodec : public AwacsBase {
public:
MacioSndCodec(std::string name) : AwacsBase(name) {};
MacioSndCodec(std::string name) : AwacsBase(name) {}
virtual uint32_t snd_ctrl_read(uint32_t offset, int size) = 0;
virtual void snd_ctrl_write(uint32_t offset, uint32_t value, int size) = 0;
};
+2 -2
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)
@@ -41,7 +41,7 @@ public:
int set_fpos(const uint32_t lba);
int read_begin(int nblocks, uint32_t max_len);
int data_left() { return this->remain_size; };
int data_left() { return this->remain_size; }
int read_more();
int write_begin(char *buf, int nblocks);
+3 -3
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)
@@ -86,7 +86,7 @@ enum RamdacRegs : uint8_t {
VENDOR_ID = 0x40, // Dacula: DAC_TYPE 0x3c or 0x84
};
}; // namespace RamdacRegs
} // namespace RamdacRegs
typedef std::function<void(uint8_t index, uint8_t *colors)> GetClutEntryCallback;
typedef std::function<void(uint8_t index, uint8_t *colors)> SetClutEntryCallback;
@@ -109,7 +109,7 @@ public:
this->video_width = width;
this->video_height = height;
this->fb_pitch = pitch;
};
}
void measure_hw_cursor(uint8_t *fb_ptr);
void draw_hw_cursor(uint8_t *src_buf, uint8_t *dst_buf, int dst_pitch);
+2 -2
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)
@@ -44,7 +44,7 @@ public:
// PCI device methods
bool supports_io_space(void) {
return true;
};
}
// I/O space access methods
bool pci_io_read(uint32_t offset, uint32_t size, uint32_t* res);
+2 -2
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)
@@ -68,7 +68,7 @@ enum ControlRegs : int {
INT_STATUS = 0x1A, // interrupt status bits (ro) 3 bits
};
}; // namespace ControlRegs
} // namespace ControlRegs
// Bit definitions for the video timing generator (Swatch) control register.
enum {
+3 -3
View File
@@ -52,21 +52,21 @@ public:
uint8_t get_video_mode() const {
return ((this->video_mode & 0x1F) | this->blanking);
};
}
void set_video_mode(uint8_t new_mode);
void set_pixel_depth(uint8_t depth);
void set_vdac_config(uint8_t config);
uint8_t get_vdac_config() const {
return this->vdac_mode;
};
}
void set_clut_index(uint8_t index);
void set_clut_color(uint8_t color);
void init_interrupts(InterruptCtrl *int_ctrl, uint32_t vbl_irq_id) {
this->int_ctrl = int_ctrl;
this->irq_id = vbl_irq_id;
};
}
protected:
void set_depth_internal(int width);
+2 -2
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -60,6 +60,6 @@ enum {
VRAM_MASK_HI = 0x0091,
};
}; // namespace Rgb514
} // namespace Rgb514
#endif // IBM_RGB514_DEFS_H
+2 -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)
@@ -116,7 +116,7 @@ enum Saa7187Regs : uint8_t { // i2c address is 0x44; fatman is at 0x46?
last_reg = 0x7e,
};
}; // namespace Saa7187Regs
} // namespace Saa7187Regs
class Saa7187VideoEncoder : public I2CDevice, public HWComponent
{
+3 -3
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)
@@ -41,7 +41,7 @@ enum Sixty6BaseReg : uint32_t {
CONTROL_ADDR = 0x03,
};
};
}
namespace Sixty6Reg {
@@ -95,7 +95,7 @@ enum Sixty6Reg : uint32_t {
// registers 0x99..0xff are read only and read from registers 0x19..0x7F.
};
};
}
class Saa7187VideoEncoder;
class ControlVideo;
+6 -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)
@@ -126,18 +126,18 @@ public:
supports_types(HWCompType::I2C_DEV);
this->my_addr = dev_addr;
};
}
~Bt856() = default;
// I2CDevice methods
void start_transaction() {
this->pos = 0; // reset read/write position
};
}
bool send_subaddress(uint8_t sub_addr) {
return true;
};
}
bool send_byte(uint8_t data) {
switch (this->pos) {
@@ -153,12 +153,12 @@ public:
return false; // return NACK
}
return true;
};
}
bool receive_byte(uint8_t* p_data) {
*p_data = 0x60; // return my device ID
return true;
};
}
private:
uint8_t my_addr = 0;
+3 -3
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)
@@ -58,8 +58,8 @@ public:
// HW cursor support
void setup_hw_cursor(int cursor_width=64, int cur_height=64);
virtual void draw_hw_cursor(uint8_t *dst_buf, int dst_pitch) {};
virtual void get_cursor_position(int& x, int& y) { x = 0; y = 0; };
virtual void draw_hw_cursor(uint8_t *dst_buf, int dst_pitch) {}
virtual void get_cursor_position(int& x, int& y) { x = 0; y = 0; }
// converters for various framebuffer pixel depths
void convert_frame_1bpp_indexed(uint8_t *dst_buf, int dst_pitch);
+3 -3
View File
@@ -168,7 +168,7 @@ public:
: BasicProperty(PROP_TYPE_BINARY, (val & 1) ? "on" : "off")
{
this->bin_val = val & 1;
};
}
BasicProperty* clone() const { return new BinProperty(*this); }
@@ -177,9 +177,9 @@ public:
std::string get_valid_values_as_str() {
return std::string("on, off, ON, OFF");
};
}
int get_val() { return this->bin_val; };
int get_val() { return this->bin_val; }
private:
int bin_val;
+2 -2
View File
@@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-21 divingkatae and maximum
Copyright (C) 2018-25 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@@ -44,7 +44,7 @@ typedef struct ProfileVar {
/** Base class for user-defined profiles. */
class BaseProfile {
public:
BaseProfile(std::string name) { this->name = name; };
BaseProfile(std::string name) { this->name = name; }
virtual ~BaseProfile() = default;