Skip to content

Commit

Permalink
still not working
Browse files Browse the repository at this point in the history
  • Loading branch information
roee toledano committed Jan 4, 2024
1 parent e565936 commit 4559ed2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ fi

echo "Building emulator..."

g++ -g -c src/main.cpp -o main.o

g++ -g -c src/cpu.cpp -o cpu.o
# g++ -g -c src/ppu.cpp -o ppu.o
g++ -g -c src/ppu.cpp -o ppu.o
g++ -g -c src/operations.cpp -o operations.o
g++ -g -c src/bus.cpp -o bus.o
g++ -g -c src/utils.cpp -o util.o
g++ -g -c src/mapper_n_cart.cpp -o mapper_n_cart.o
g++ -g -c src/main.cpp -o main.o

g++ -g -c src/mappers/nrom_0.cpp -o nrom_0.o

Expand Down
6 changes: 3 additions & 3 deletions include/bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include <cstdint>

#include "mapper_n_cart.h"
// #include "ppu.h"
#include "cpu.h"
#include "../include/mapper_n_cart.h"
#include "../include/ppu.h"
#include "../include/cpu.h"

class Bus{
public:
Expand Down
2 changes: 1 addition & 1 deletion include/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <cstdint>
#include <vector>

#include "bus.h"
#include "../include/bus.h"

#define IRQ_CYCLES 7
#define NMI_CYCLES 8
Expand Down
2 changes: 1 addition & 1 deletion include/ppu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <cstdint>

#include "bus.h"
#include "../include/bus.h"

class PPU {
public:
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// #include <SDL2/SDL.h>

#include "../include/cpu.h"
// #include "../include/ppu.h"
#include "../include/ppu.h"
#include "../include/bus.h"
#include "../include/utils.h"

Expand All @@ -13,7 +13,7 @@ int main(){

Bus bus = Bus(Mapper::create_mapper("testr/gameroms/Donkey Kong (U) (PRG1) [!p](1).nes"));
CPU cpu = CPU(&bus);
// PPU ppu = PPU(&bus);
PPU ppu = PPU(&bus);

for (int i = 0; i < 10; i++){
cpu.log();
Expand Down

0 comments on commit 4559ed2

Please sign in to comment.