From 134eda8c12938df807ca9418be623dfeae0791f0 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Fri, 27 Dec 2019 00:42:02 +0100 Subject: [PATCH] Clean up some comments and messages. --- cpu/ppc/ppcmemory.cpp | 28 ---------------------------- devices/machineid.h | 2 +- devices/macio.h | 6 +++--- main.cpp | 2 +- 4 files changed, 5 insertions(+), 33 deletions(-) diff --git a/cpu/ppc/ppcmemory.cpp b/cpu/ppc/ppcmemory.cpp index 02d532b..127dd29 100644 --- a/cpu/ppc/ppcmemory.cpp +++ b/cpu/ppc/ppcmemory.cpp @@ -59,32 +59,6 @@ std::atomic hash_found (false); PPC_BAT_entry ibat_array[4] = {{0}}; PPC_BAT_entry dbat_array[4] = {{0}}; - -/** -Quickly map to memory - sort of. - -0x00000000 - 0x7FFFFFFF - Macintosh system memory -(Because this emulator is trying to emulate a Mac with a Grackle motherboard, - the most memory that can ever be allocated to the system is 2 Gigs.) - -0x80000000 - 0xFF7FFFFF - PCI memory -This memory is allocated to things like the memory controller, video, and audio. - -0xF3000000 - Mac OS I/O Device area -0xF3013000 - Serial Printer Port (0x20 bytes) -0xF3013020 - Serial Modem Port (0x20 bytes) -0xF3011000 - BMAC Ethernet (0x1000 bytes) -0xF3014000 - DAVAudio Sound Bus (0x1000 bytes) -0xF3015000 - Swim 3 Floppy Disk Drive (0x1000 bytes) -0xF3016000 - Cuda (0x2000 bytes) -0xF3020000 - Heathrow ATA (Hard Drive Interface) - -0xFF800000 - 0xFFFFFFFF - ROM memory -This memory is for storing the ROM needed to boot up the computer. - -This could definitely be refactored better - TODO -**/ - void msr_status_update(){ msr_ip_test = (ppc_state.ppc_msr >> 6) & 1; msr_ir_test = (ppc_state.ppc_msr >> 5) & 1; @@ -594,8 +568,6 @@ void address_quickgrab_translate(uint32_t addr, uint8_t num_bytes) { /* data address translation if enabled */ if (ppc_state.ppc_msr & 0x10) { - //printf("DATA RELOCATION GO! - GRABBING \n"); - addr = ppc_mmu_addr_translate(addr, 0); } diff --git a/devices/machineid.h b/devices/machineid.h index 2f2cf8c..a3a986e 100644 --- a/devices/machineid.h +++ b/devices/machineid.h @@ -18,7 +18,7 @@ It contains a 16-bit value revealing machine's capabilities like bus speed, ROM speed, I/O configuration etc. Because the meaning of these bits is poorly documented, the code below - simply return raw values obtained from real hardware. + simply return a raw value obtained from real hardware. */ class GossamerID : public MMIODevice { public: diff --git a/devices/macio.h b/devices/macio.h index 9ca9864..53bfd09 100644 --- a/devices/macio.h +++ b/devices/macio.h @@ -1,7 +1,7 @@ /** MacIO device family emulation Mac I/O (MIO) is a family of ASICs to bring support for Apple legacy - I/O hardware to PCI-based Power Macintosh. That legacy hardware has + I/O hardware to the PCI-based Power Macintosh. That legacy hardware has existed long before Power Macintosh was introduced. It includes: - versatile interface adapter (VIA) - Sander-Woz integrated machine (SWIM) that is a floppy disk controller @@ -15,8 +15,8 @@ are called "cells", i.e. "VIA cell", "SWIM cell" etc. MIO itself is PCI compliant while the legacy hardware it emulates isn't. - MIO occupies 512Kb of PCI memory space divided into registers space and DMA - space. Access to emulated legacy devices is accomplished by reading from/ + MIO occupies 512Kb of the PCI memory space divided into registers space and + DMA space. Access to emulated legacy devices is accomplished by reading from/ writing to MIO's PCI address space at predefined offsets. MIO includes a DMA controller that offers 15 DMA channels implementing diff --git a/main.cpp b/main.cpp index ec96d6c..40c8f88 100644 --- a/main.cpp +++ b/main.cpp @@ -449,7 +449,7 @@ int main(int argc, char **argv) if (romFile.fail()){ cerr << "rom.bin not present. Please provide an appropriate ROM file" - << "and restart this program.\n"; + << " and restart this program.\n"; romFile.close(); return 1;