fixed mem access violation

This commit is contained in:
Lauchmelder 2021-10-24 13:47:11 +02:00
parent 2b71e3e0d2
commit 56c9dfbe6e
8 changed files with 188 additions and 64 deletions

View file

@ -7,7 +7,7 @@
#include "ppu.h"
#include "cartridge.h"
struct Bus* createBus()
struct Bus* createBus(SDL_Renderer* renderer)
{
struct Bus* bus = (struct Bus*)malloc(sizeof(struct Bus));
if (bus == NULL)
@ -40,6 +40,7 @@ struct Bus* createBus()
bus->cpu = createCPU(bus);
// Create PPU and attack it
bus->screen = renderer;
bus->ppu = createPPU(bus);
bus->masterClockTimer = 0;