Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
smp: move the SMP I/O ports into the SMP itself, instead of half in t…
…he CPU and half in the APU RAM. I don't care what byuu thinks blargg's hardware tests showed, it is literally impossible for hardware to work that way
- Loading branch information
Showing
with
57 additions
and 97 deletions.
- +1 −6 bsnes/snes/alt/cpu/cpu.hpp
- +0 −8 bsnes/snes/alt/cpu/memory.cpp
- +0 −11 bsnes/snes/alt/cpu/mmio.cpp
- +0 −1 bsnes/snes/alt/cpu/serialization.cpp
- +1 −7 bsnes/snes/cpu/cpu.hpp
- +0 −3 bsnes/snes/cpu/memory/memory.cpp
- +0 −16 bsnes/snes/cpu/mmio/mmio.cpp
- +0 −2 bsnes/snes/cpu/serialization.cpp
- +13 −28 bsnes/snes/smp/memory/memory.cpp
- +13 −0 bsnes/snes/smp/mmio/mmio.cpp
- +2 −0 bsnes/snes/smp/mmio/mmio.hpp
- +3 −2 bsnes/snes/smp/serialization.cpp
- +11 −3 bsnes/snes/smp/smp.cpp
- +11 −8 bsnes/snes/smp/smp.hpp
- +1 −1 bsnes/snes/snes.hpp
- +1 −1 bsnes/snes/system/system.cpp
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -12,14 +12,6 @@ bool CPU::interrupt_pending() { | ||
| return false; | ||
| } | ||
|
|
||
| void CPU::op_io() { | ||
| add_clocks(6); | ||
| } | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -6,7 +6,6 @@ void CPU::serialize(serializer &s) { | ||
| PPUcounter::serialize(s); | ||
|
|
||
| queue.serialize(s); | ||
|
|
||
| for(unsigned i = 0; i < 8; i++) { | ||
| s.integer(channel[i].dma_enabled); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -1,8 +1,5 @@ | ||
| #ifdef CPU_CPP | ||
|
|
||
| void CPU::op_io() { | ||
| status.clock_count = 6; | ||
| dma_edge(); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -44,8 +44,6 @@ void CPU::serialize(serializer &s) { | ||
| s.integer(status.hdma_pending); | ||
| s.integer(status.hdma_mode); | ||
|
|
||
| s.integer(status.wram_addr); | ||
|
|
||
| s.integer(status.joypad_strobe_latch); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,13 @@ | ||
| #ifdef SMP_CPP | ||
|
|
||
| uint8 SMP::mmio_read(unsigned addr) { | ||
| cpu.synchronize_smp(); | ||
| return port.smp_to_cpu[addr & 3]; | ||
| } | ||
|
|
||
| void SMP::mmio_write(unsigned addr, uint8 data) { | ||
| cpu.synchronize_smp(); | ||
| port.cpu_to_smp[addr & 3] = data; | ||
| } | ||
|
|
||
| #endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,2 @@ | ||
| uint8 mmio_read(unsigned addr); | ||
| void mmio_write(unsigned addr, uint8 data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters