ComSquare
Public Attributes | List of all members
ComSquare::CPU::Registers Struct Reference

Struct containing registers for the main CPU. More...

#include <Registers.hpp>

Collaboration diagram for ComSquare::CPU::Registers:

Public Attributes

union {
   struct {
      uint8_t   al
 
      uint8_t   ah
 
   } 
 
   uint16_t   a
 
}; 
 The Accumulator. More...
 
uint8_t dbr
 The Data Bank Register;. More...
 
union {
   struct {
      uint8_t   dl
 
      uint8_t   dh
 
   } 
 
   uint16_t   d
 
}; 
 The Direct Page register;. More...
 
union {
   struct {
      union {
         struct {
            uint8_t   pcl
 
            uint8_t   pch
 
         } 
 
         uint16_t   pc
 
      } 
 The Program Counter;. More...
 
      uint8_t   pbr
 The Program Bank Register;. More...
 
   } 
 
   uint24_t   pac
 The current Program Address Counter (does not exist in a snes but is useful here). More...
 
}; 
 
union {
   struct {
      uint8_t   sl
 
      uint8_t   sh
 
   } 
 
   uint16_t   s
 
}; 
 The Stack pointer. More...
 
union {
   struct {
      uint8_t   xl
 
      uint8_t   xh
 
   } 
 
   uint16_t   x
 
}; 
 The X index register. More...
 
union {
   struct {
      uint8_t   yl
 
      uint8_t   yh
 
   } 
 
   uint16_t   y
 
}; 
 The Y index register. More...
 
union {
   struct {
      bool   c: 1
 The Carry flag. More...
 
      bool   z: 1
 The Zero flag. More...
 
      bool   i: 1
 The Interrupt request disable flag. More...
 
      bool   d: 1
 The Decimal mode flag. More...
 
      bool   x_b: 1
 The indeX register width flag (in native mode only) - 0 = 16 bits mode, 1 = 8 bits mode OR the Break flag (in emulation mode only) More...
 
      bool   m: 1
 The accumulator and Memory width flag (in native mode only) - 0 = 16 bits mode, 1 = 8 bits mode. More...
 
      bool   v: 1
 The oVerflow flag. More...
 
      bool   n: 1
 The Negative flag. More...
 
   } 
 
   uint8_t   flags
 
p
 The Processor status register;. More...
 

Detailed Description

Struct containing registers for the main CPU.

Member Data Documentation

◆ @46

union { ... }

The Accumulator.

◆ @48

union { ... }

The Direct Page register;.

◆ @50

union { ... }

◆ @52

union { ... }

The Stack pointer.

◆ @54

union { ... }

The X index register.

◆ @56

union { ... }

The Y index register.

◆ a

uint16_t ComSquare::CPU::Registers::a

◆ ah

uint8_t ComSquare::CPU::Registers::ah

◆ al

uint8_t ComSquare::CPU::Registers::al

◆ c

bool ComSquare::CPU::Registers::c

The Carry flag.

◆ d [1/2]

uint16_t ComSquare::CPU::Registers::d

◆ d [2/2]

bool ComSquare::CPU::Registers::d

The Decimal mode flag.

◆ dbr

uint8_t ComSquare::CPU::Registers::dbr

The Data Bank Register;.

◆ dh

uint8_t ComSquare::CPU::Registers::dh

◆ dl

uint8_t ComSquare::CPU::Registers::dl

◆ flags

uint8_t ComSquare::CPU::Registers::flags

◆ i

bool ComSquare::CPU::Registers::i

The Interrupt request disable flag.

◆ m

bool ComSquare::CPU::Registers::m

The accumulator and Memory width flag (in native mode only) - 0 = 16 bits mode, 1 = 8 bits mode.

◆ n

bool ComSquare::CPU::Registers::n

The Negative flag.

◆ p

union { ... } ComSquare::CPU::Registers::p

The Processor status register;.

◆ pac

uint24_t ComSquare::CPU::Registers::pac

The current Program Address Counter (does not exist in a snes but is useful here).

◆ pbr

uint8_t ComSquare::CPU::Registers::pbr

The Program Bank Register;.

◆ pc

uint16_t ComSquare::CPU::Registers::pc

◆ pch

uint8_t ComSquare::CPU::Registers::pch

◆ pcl

uint8_t ComSquare::CPU::Registers::pcl

◆ s

uint16_t ComSquare::CPU::Registers::s

◆ sh

uint8_t ComSquare::CPU::Registers::sh

◆ sl

uint8_t ComSquare::CPU::Registers::sl

◆ v

bool ComSquare::CPU::Registers::v

The oVerflow flag.

◆ x

uint16_t ComSquare::CPU::Registers::x

◆ x_b

bool ComSquare::CPU::Registers::x_b

The indeX register width flag (in native mode only) - 0 = 16 bits mode, 1 = 8 bits mode OR the Break flag (in emulation mode only)

◆ xh

uint8_t ComSquare::CPU::Registers::xh

◆ xl

uint8_t ComSquare::CPU::Registers::xl

◆ y

uint16_t ComSquare::CPU::Registers::y

◆ yh

uint8_t ComSquare::CPU::Registers::yh

◆ yl

uint8_t ComSquare::CPU::Registers::yl

◆ z

bool ComSquare::CPU::Registers::z

The Zero flag.


The documentation for this struct was generated from the following file: