Skip to content

Commit a1ddacb

Browse files
author
tiansongyu
committed
add lincese && remove warning
1 parent 899e80c commit a1ddacb

26 files changed

+423
-185
lines changed

6502/6502Emulator/src/olcNes_PPU_Backgrounds.cpp

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
// Copyright [2021] <tiansongyu>
2-
1+
// Copyright (C) 2020-2022 tiansongyu
2+
//
3+
// This file is part of 6502Emulator.
4+
//
5+
// 6502Emulator is free GameEngine: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// 6502Emulator is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with 6502Emulator. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// 6502Emulator is actively maintained and developed!
319
#include <deque>
420
#include <iostream>
521
#include <sstream>
@@ -64,14 +80,14 @@ class Demo_olcNES : public olc::PixelGameEngine
6480
{
6581
std::string status = "STATUS: ";
6682
DrawString(x, y, "STATUS:", olc::WHITE);
67-
DrawString(x + 64, y, "N", nes.cpu.status & olc6502::N ? olc::GREEN : olc::RED);
68-
DrawString(x + 80, y, "V", nes.cpu.status & olc6502::V ? olc::GREEN : olc::RED);
69-
DrawString(x + 96, y, "-", nes.cpu.status & olc6502::U ? olc::GREEN : olc::RED);
70-
DrawString(x + 112, y, "B", nes.cpu.status & olc6502::B ? olc::GREEN : olc::RED);
71-
DrawString(x + 128, y, "D", nes.cpu.status & olc6502::D ? olc::GREEN : olc::RED);
72-
DrawString(x + 144, y, "I", nes.cpu.status & olc6502::I ? olc::GREEN : olc::RED);
73-
DrawString(x + 160, y, "Z", nes.cpu.status & olc6502::Z ? olc::GREEN : olc::RED);
74-
DrawString(x + 178, y, "C", nes.cpu.status & olc6502::C ? olc::GREEN : olc::RED);
83+
DrawString(x + 64, y, "N", nes.cpu.status & Nes6502::N ? olc::GREEN : olc::RED);
84+
DrawString(x + 80, y, "V", nes.cpu.status & Nes6502::V ? olc::GREEN : olc::RED);
85+
DrawString(x + 96, y, "-", nes.cpu.status & Nes6502::U ? olc::GREEN : olc::RED);
86+
DrawString(x + 112, y, "B", nes.cpu.status & Nes6502::B ? olc::GREEN : olc::RED);
87+
DrawString(x + 128, y, "D", nes.cpu.status & Nes6502::D ? olc::GREEN : olc::RED);
88+
DrawString(x + 144, y, "I", nes.cpu.status & Nes6502::I ? olc::GREEN : olc::RED);
89+
DrawString(x + 160, y, "Z", nes.cpu.status & Nes6502::Z ? olc::GREEN : olc::RED);
90+
DrawString(x + 178, y, "C", nes.cpu.status & Nes6502::C ? olc::GREEN : olc::RED);
7591
DrawString(x, y + 10, "PC: $" + hex(nes.cpu.pc, 4));
7692
DrawString(x, y + 20, "A: $" + hex(nes.cpu.a, 2) + " [" + std::to_string(nes.cpu.a) + "]");
7793
DrawString(x, y + 30, "X: $" + hex(nes.cpu.x, 2) + " [" + std::to_string(nes.cpu.x) + "]");

6502/6502Lib/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ set (M6502_SOURCES
3030
"src/public/Mapper_004.cpp"
3131
"src/public/Mapper_066.h"
3232
"src/public/Mapper_066.cpp"
33-
"src/public/olc2C02.h"
34-
"src/public/olc2C02.cpp"
35-
"src/public/olc6502.h"
36-
"src/public/olc6502.cpp"
33+
"src/public/Nes2C02.h"
34+
"src/public/Nes2C02.cpp"
35+
"src/public/Nes6502.h"
36+
"src/public/Nes6502.cpp"
3737
"src/public/olcPGEX_Sound.h"
3838
"src/public/olcPixelGameEngine.h"
39-
"src/public/olc2A03.cpp"
40-
"src/public/olc2A03.h"
39+
"src/public/Nes2A03.cpp"
40+
"src/public/Nes2A03.h"
4141
)
4242

4343
source_group("src" FILES ${M6502_SOURCES})

6502/6502Lib/src/public/Bus.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
// Copyright [2020-2021] <tiansongyu>
1+
// Copyright (C) 2020-2022 tiansongyu
2+
//
3+
// This file is part of 6502Emulator.
4+
//
5+
// 6502Emulator is free GameEngine: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// 6502Emulator is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with 6502Emulator. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// 6502Emulator is actively maintained and developed!
219
#include "Bus.h"
320

421
Bus::Bus()

6502/6502Lib/src/public/Bus.h

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
// Copyright [2021] <tiansongyu>
1+
// Copyright (C) 2020-2022 tiansongyu
2+
//
3+
// This file is part of 6502Emulator.
4+
//
5+
// 6502Emulator is free GameEngine: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// 6502Emulator is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with 6502Emulator. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// 6502Emulator is actively maintained and developed!
219
#ifndef __6502_6502LIB_SRC_PUBLIC_BUS_H_
320
#define __6502_6502LIB_SRC_PUBLIC_BUS_H_
421

@@ -7,9 +24,9 @@
724
#include <memory>
825

926
#include "Cartridge.h"
10-
#include "olc2A03.h"
11-
#include "olc2C02.h"
12-
#include "olc6502.h"
27+
#include "Nes2A03.h"
28+
#include "Nes2C02.h"
29+
#include "Nes6502.h"
1330

1431
class Bus
1532
{
@@ -19,11 +36,11 @@ class Bus
1936

2037
public: // 总线
2138
// 6502 CPU
22-
olc6502 cpu;
39+
Nes6502 cpu;
2340
// 2C02 PPU图形处理器。。。显卡。。。
24-
olc2C02 ppu;
41+
Nes2C02 ppu;
2542
// 2A03 APU 声卡。。。
26-
olc2A03 apu;
43+
Nes2A03 apu;
2744
std::shared_ptr<Cartridge> cart;
2845
// CPU中2KB的内存RAM
2946
uint8_t cpuRam[2048];

6502/6502Lib/src/public/Cartridge.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
// Copyright [2021] <tiansongyu>
1+
// Copyright (C) 2020-2022 tiansongyu
2+
//
3+
// This file is part of 6502Emulator.
4+
//
5+
// 6502Emulator is free GameEngine: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// 6502Emulator is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with 6502Emulator. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// 6502Emulator is actively maintained and developed!
219

320
#include "Cartridge.h"
421

6502/6502Lib/src/public/Cartridge.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1-
// Copyright [2021] <tiansongyu>
1+
// Copyright (C) 2020-2022 tiansongyu
2+
//
3+
// This file is part of 6502Emulator.
4+
//
5+
// 6502Emulator is free GameEngine: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// 6502Emulator is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with 6502Emulator. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// 6502Emulator is actively maintained and developed!
219
#ifndef _6502_6502LIB_SRC_PUBLIC_CARTRIDGE_H_
320
#define _6502_6502LIB_SRC_PUBLIC_CARTRIDGE_H_
21+
422
#include <cstdint>
523
#include <fstream>
624
#include <memory>

6502/6502Lib/src/public/Mapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright [2020-2021] <tiansongyu>
1+
// Copyright [2020-2022] <tiansongyu>
22

33
#include "Mapper.h"
44

6502/6502Lib/src/public/Mapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright [2020-2021] <tiansongyu>
1+
// Copyright [2020-2022] <tiansongyu>
22

33
#pragma once
44
#include <cstdint>

6502/6502Lib/src/public/Mapper_000.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
// Copyright [2021] <tiansongyu>
1+
// Copyright (C) 2020-2022 tiansongyu
2+
//
3+
// This file is part of 6502Emulator.
4+
//
5+
// 6502Emulator is free GameEngine: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// 6502Emulator is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with 6502Emulator. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// 6502Emulator is actively maintained and developed!
219
#ifdef __GNUC__
320
// 关闭 警告:由于数据类型范围限制,比较结果永远为真
421
// 关闭 警告:unused parameter

6502/6502Lib/src/public/Mapper_000.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
// Copyright [2021] <tiansongyu>
1+
// Copyright (C) 2020-2022 tiansongyu
2+
//
3+
// This file is part of 6502Emulator.
4+
//
5+
// 6502Emulator is free GameEngine: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// 6502Emulator is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with 6502Emulator. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// 6502Emulator is actively maintained and developed!
219
#ifndef _6502_6502LIB_SRC_PUBLIC_MAPPER_000_H_
320
#define _6502_6502LIB_SRC_PUBLIC_MAPPER_000_H_
421
#include "Mapper.h"

0 commit comments

Comments
 (0)