ComSquare
Public Member Functions | Private Attributes | List of all members
ComSquare::APU::DSP::DSP Class Reference

#include <DSP.hpp>

Inheritance diagram for ComSquare::APU::DSP::DSP:
Inheritance graph
Collaboration diagram for ComSquare::APU::DSP::DSP:
Collaboration graph

Public Member Functions

 DSP ()
 
uint8_t read (uint24_t addr) override
 Read from the internal DSP register. More...
 
void write (uint24_t addr, uint8_t data) override
 Write data to the internal DSP register. More...
 
- Public Member Functions inherited from ComSquare::Memory::IMemory
void setMemoryRegion (uint24_t start, uint24_t end)
 Change starting and ending points of this mapped memory. More...
 
virtual bool hasMemoryAt (uint24_t addr)
 Return true if this component has mapped the address. More...
 
virtual uint24_t getStart ()
 Get the first address mapped to this component. More...
 

Private Attributes

Registers _registers {}
 All registers of the DSP. More...
 
sf::Sound _channels [8]
 8x channels of sample used to make sound More...
 
sf::SoundBuffer _soundBuffer
 A buffer containing current wave. More...
 

Constructor & Destructor Documentation

◆ DSP()

ComSquare::APU::DSP::DSP::DSP ( )
explicit

Member Function Documentation

◆ read()

uint8_t ComSquare::APU::DSP::DSP::read ( uint24_t  addr)
overridevirtual

Read from the internal DSP register.

Parameters
addrThe address to read from. The address 0x0 should refer to the first byte of the register.
Exceptions
InvalidAddresswill be thrown if the address is more than $7F (the number of register).
Returns
Return the value of the register.

Implements ComSquare::Memory::IMemory.

◆ write()

void ComSquare::APU::DSP::DSP::write ( uint24_t  addr,
uint8_t  data 
)
overridevirtual

Write data to the internal DSP register.

Parameters
addrThe address to write to. The address 0x0 should refer to the first byte of register.
dataThe new value of the register.
Exceptions
InvalidAddresswill be thrown if the address is more than $7F (the number of register).

Implements ComSquare::Memory::IMemory.

Member Data Documentation

◆ _channels

sf::Sound ComSquare::APU::DSP::DSP::_channels[8]
private

8x channels of sample used to make sound

◆ _registers

Registers ComSquare::APU::DSP::DSP::_registers {}
private

All registers of the DSP.

◆ _soundBuffer

sf::SoundBuffer ComSquare::APU::DSP::DSP::_soundBuffer
private

A buffer containing current wave.


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