ComSquare
Public Member Functions | Public Attributes | List of all members
ComSquare::SNES Class Reference

Container of all the components of the SNES. More...

#include <SNES.hpp>

Collaboration diagram for ComSquare::SNES:

Public Member Functions

 SNES (Renderer::IRenderer &renderer)
 Create all the components using a common memory bus for all of them. More...
 
 SNES (const std::string &ramPath, Renderer::IRenderer &renderer)
 Create all the components using a common memory bus for all of them and load a rom. More...
 
 SNES (const SNES &)=delete
 A SNES is not copyable. More...
 
SNESoperator= (const SNES &)=delete
 A SNES can't be assigned. More...
 
 ~SNES ()=default
 A default destructor. More...
 
void update ()
 Call this function to update all the components. More...
 
void loadRom (const std::string &path)
 Load the rom at the given path. More...
 

Public Attributes

Memory::MemoryBus bus
 The memory bus that map addresses to components. More...
 
Cartridge::Cartridge cartridge
 Cartridge containing instructions (ROM). More...
 
Ram::Ram wram
 Work Ram shared by all the components. More...
 
Ram::Ram sram
 Save Ram residing inside the Cartridge in a real SNES. More...
 
CPU::CPU cpu
 Central Processing Unit of the SNES. More...
 
PPU::PPU ppu
 Picture Processing Unit of the SNES. More...
 
APU::APU apu
 Audio Processing Unit if the SNES. More...
 

Detailed Description

Container of all the components of the SNES.

Constructor & Destructor Documentation

◆ SNES() [1/3]

ComSquare::SNES::SNES ( Renderer::IRenderer renderer)
explicit

Create all the components using a common memory bus for all of them.

Parameters
rendererThe renderer to use.

◆ SNES() [2/3]

ComSquare::SNES::SNES ( const std::string &  ramPath,
Renderer::IRenderer renderer 
)

Create all the components using a common memory bus for all of them and load a rom.

Parameters
ramPathThe rom to load.
rendererThe renderer to use.

◆ SNES() [3/3]

ComSquare::SNES::SNES ( const SNES )
delete

A SNES is not copyable.

◆ ~SNES()

ComSquare::SNES::~SNES ( )
default

A default destructor.

Member Function Documentation

◆ loadRom()

void ComSquare::SNES::loadRom ( const std::string &  path)

Load the rom at the given path.

Parameters
romThe path of the rom.
Exceptions
InvalidRomExceptionIf the rom is invalid, this exception is thrown.

◆ operator=()

SNES& ComSquare::SNES::operator= ( const SNES )
delete

A SNES can't be assigned.

◆ update()

void ComSquare::SNES::update ( )

Call this function to update all the components.

Member Data Documentation

◆ apu

APU::APU ComSquare::SNES::apu

Audio Processing Unit if the SNES.

◆ bus

Memory::MemoryBus ComSquare::SNES::bus

The memory bus that map addresses to components.

◆ cartridge

Cartridge::Cartridge ComSquare::SNES::cartridge

Cartridge containing instructions (ROM).

◆ cpu

CPU::CPU ComSquare::SNES::cpu

Central Processing Unit of the SNES.

◆ ppu

PPU::PPU ComSquare::SNES::ppu

Picture Processing Unit of the SNES.

◆ sram

Ram::Ram ComSquare::SNES::sram

Save Ram residing inside the Cartridge in a real SNES.

◆ wram

Ram::Ram ComSquare::SNES::wram

Work Ram shared by all the components.


The documentation for this class was generated from the following files: