mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-08-06 10:25:27 +00:00
Fix Gossamer system register.
This commit is contained in:
@@ -82,7 +82,7 @@ public:
|
||||
~GossamerID() = default;
|
||||
|
||||
uint32_t read(uint32_t rgn_start, uint32_t offset, int size) {
|
||||
return ((!offset && size == 2) ? this->id : 0);
|
||||
return ((offset == 4 && size == 2) ? this->id : 0);
|
||||
};
|
||||
|
||||
/* not writable */
|
||||
|
@@ -109,7 +109,7 @@ int initialize_gossamer(std::string& id)
|
||||
|
||||
gMachineObj->add_device("MachineID", std::unique_ptr<GossamerID>(new GossamerID(sys_reg)));
|
||||
grackle_obj->add_mmio_region(
|
||||
0xFF000000 + 4, 4096 - 4, dynamic_cast<MMIODevice*>(gMachineObj->get_comp_by_name("MachineID")));
|
||||
0xFF000000, 4096, dynamic_cast<MMIODevice*>(gMachineObj->get_comp_by_name("MachineID")));
|
||||
|
||||
// allocate ROM region
|
||||
if (!grackle_obj->add_rom_region(0xFFC00000, 0x400000)) {
|
||||
|
Reference in New Issue
Block a user