File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Bus::~Bus() {}
1010
1111void Bus::SetSampleFrequency (uint32_t sample_rate) {
1212 // sample_rate是声音采样率,这个采样率决定一个声音数据的发生周期
13- dAudioTimePerSystemSample = 1.0 / static_cast <double >sample_rate;
13+ dAudioTimePerSystemSample = 1.0 / static_cast <double >( sample_rate) ;
1414 dAudioTimePerNESClock =
1515 1.0 / 5369318.0 ; // 1 / ppu的时钟频率 = ppu的时钟周期
1616}
Original file line number Diff line number Diff line change 11// Copyright [2021] <tiansongyu>
2- #ifndef 6502_6502LIB_SRC_PUBLIC_BUS_H_
3- #define 6502_6502LIB_SRC_PUBLIC_BUS_H_
2+ #ifndef __6502_6502LIB_SRC_PUBLIC_BUS_H_
3+ #define __6502_6502LIB_SRC_PUBLIC_BUS_H_
44
55#include < array>
66#include < cstdint>
@@ -79,4 +79,4 @@ class Bus {
7979 // 系统clock
8080 bool clock ();
8181};
82- #endif // 6502_6502LIB_SRC_PUBLIC_BUS_H_
82+ #endif // __6502_6502LIB_SRC_PUBLIC_BUS_H_
Original file line number Diff line number Diff line change 11// Copyright [2021] <tiansongyu>
2+ #ifndef _6502_6502LIB_SRC_PUBLIC_CARTRIDGE_H_
3+ #define _6502_6502LIB_SRC_PUBLIC_CARTRIDGE_H_
24#include < cstdint>
35#include < fstream>
46#include < memory>
57#include < string>
68#include < vector>
79
810#include " Mapper_000.h"
9- // 待添加不同种类的mapper
11+ // 待添加不同种类的mapper
1012#include " Mapper_001.h"
1113#include " Mapper_002.h"
1214#include " Mapper_003.h"
1517
1618class Cartridge {
1719 public:
18- Cartridge (const std::string &sFileName );
20+ explicit Cartridge (const std::string &sFileName );
1921 ~Cartridge ();
2022
2123 public:
@@ -49,3 +51,4 @@ class Cartridge {
4951
5052 MIRROR Mirror ();
5153};
54+ #endif // _6502_6502LIB_SRC_PUBLIC_CARTRIDGE_H_
You can’t perform that action at this time.
0 commit comments