Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ares/fc/ppu/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ auto PPU::Debugger::load(Node::Object parent) -> void {

memory.cgram = parent->append<Node::Debugger::Memory>("PPU CGRAM");
memory.cgram->setSize(ppu.cgram.size());
memory.cgram->setRead([&](u32 address) -> u8 {
memory.cgram->setRead([&](u32 address) -> u6 {
return ppu.cgram[address];
});
memory.cgram->setWrite([&](u32 address, u8 data) -> void {
memory.cgram->setWrite([&](u32 address, u6 data) -> void {
ppu.cgram[address] = data;
});

Expand Down
4 changes: 2 additions & 2 deletions ares/fc/ppu/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ auto PPU::writeCIRAM(n11 address, n8 data) -> void {
ciram[address] = data;
}

auto PPU::readCGRAM(n5 address) -> n8 {
auto PPU::readCGRAM(n5 address) -> n6 {
if((address & 0x3) == 0x0) address &= ~0x10;
n8 data = cgram[address];
if(io.grayscale) data &= 0x30;
return data;
}

auto PPU::writeCGRAM(n5 address, n8 data) -> void {
auto PPU::writeCGRAM(n5 address, n6 data) -> void {
cgram[address] = data;

if((address & 0x3) == 0x0)
Expand Down
6 changes: 3 additions & 3 deletions ares/fc/ppu/ppu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ struct PPU : Thread {
Node::Object node;
Node::Video::Screen screen;
Memory::Writable<n8> ciram;
Memory::Writable<n8> cgram;
Memory::Writable<n6> cgram;
Memory::Writable<n8> oam;
Memory::Writable<n8> soam;

Expand Down Expand Up @@ -39,8 +39,8 @@ struct PPU : Thread {
auto readCIRAM(n11 address) -> n8;
auto writeCIRAM(n11 address, n8 data) -> void;

auto readCGRAM(n5 address) -> n8;
auto writeCGRAM(n5 address, n8 data) -> void;
auto readCGRAM(n5 address) -> n6;
auto writeCGRAM(n5 address, n6 data) -> void;

auto readIO(n16 address) -> n8;
auto writeIO(n16 address, n8 data) -> void;
Expand Down
Loading