From 9a99f72a6bccea0f2c08cf708967285fc1a22935 Mon Sep 17 00:00:00 2001 From: 710lucas Date: Tue, 30 Jul 2024 22:32:29 -0300 Subject: [PATCH 1/5] Simple display with text working --- Examples/testingDisplay | 88 ++++++++++++++++++++++++++++ Examples/testingDisplay.bin | Bin 0 -> 126 bytes src/emulator/BUS/systemBus.cpp | 17 ++++-- src/emulator/BUS/systemBus.hpp | 17 ++++-- src/emulator/IO/display/display.cpp | 82 ++++++++++++++++++++++++++ src/emulator/IO/display/display.hpp | 46 +++++++++++++++ src/main.cpp | 4 ++ 7 files changed, 244 insertions(+), 10 deletions(-) create mode 100644 Examples/testingDisplay create mode 100644 Examples/testingDisplay.bin create mode 100644 src/emulator/IO/display/display.cpp create mode 100644 src/emulator/IO/display/display.hpp diff --git a/Examples/testingDisplay b/Examples/testingDisplay new file mode 100644 index 0000000..ecc7e6e --- /dev/null +++ b/Examples/testingDisplay @@ -0,0 +1,88 @@ +//Adding FD to register 0 +//FD: print display +ADD 0xFFFD 0xFF00 0x0000 + +//Telling bus to print display +//0xFF000 -> no address lane +//0xFF000 -> no data lane +//0x0000 -> control = register[0] +WBUS 0xFF00 0xFF00 0x0000 + +//Adding F9 to register 1 +//F9: Display pixel +ADD 0xFFF9 0xFF00 0x0001 + +//Telling bus to add pixel to display +WBUS 0xFF00 0xFF00 0x0001 + +//Telling bus to print the display again +//this will show the pixel in the coordinates (0,0) +WBUS 0xFF00 0xFF00 0x0000 + + +//I'll write RISC-I in memory, letter by letter + +//Adding R to register 2 +//R = 0x52 in ACII +ADD 0xFF52 0xFF00 0x0002 + +//Writing R to memory +STL 0xFFA0 0xFF00 0x0002 + + +//Adding I to register 2 +//I = 0x49 in ACII +ADD 0xFF49 0xFF00 0x0002 + +//writing I to memory +STL 0xFFA1 0xFF00 0x0002 + + + +//Adding S to register 2 +//S = 0x53 in ACII +ADD 0xFF53 0xFF00 0x0002 + +//writing S to memory +STL 0xFFA2 0xFF00 0x0002 + + +//Adding C to register 2 +//C = 0x43 in ACII +ADD 0xFF43 0xFF00 0x0002 + +//writing C to memory +STL 0xFFA3 0xFF00 0x0002 + + +//Adding - to register 2 +//- = 0x2D in ACII +ADD 0xFF2D 0xFF00 0x0002 + +//writing - to memory +STL 0xFFA4 0xFF00 0x0002 + + +//Adding I to register 2 +//I = 0x49 in ACII +ADD 0xFF49 0xFF00 0x0002 + +//writing I to memory +STL 0xFFA5 0xFF00 0x0002 + + + +//Adding instruction to display text +//in register 3 +ADD 0xFFFA 0xFF00 0x0003 + +//Size of the text: 6 -> 0xFF01 +//Address of text: 0xFFA0 +//Control: 0x0003 +WBUS 0xFF06 0xFFA0 0x0003 + +//Telling bus to print the display again +//this will print the text in the coordinates (0,0) +WBUS 0xFF00 0xFF00 0x0000 + +STP 0x0000 0x0000 0x0000 \ No newline at end of file diff --git a/Examples/testingDisplay.bin b/Examples/testingDisplay.bin new file mode 100644 index 0000000000000000000000000000000000000000..024ee8242664bf8285c3f54065320f80975aee2c GIT binary patch literal 126 zcmXBNK?;B{3`Eh1Lf2lQ2N1l2t8VKBYt=(4$TXd1@p*(mj6Z=$c#SV%@~CezF)b`! dW0Ft#kgL4Qm%PfiJnkR)Bj(7!;_bgS^l1%SGD83W literal 0 HcmV?d00001 diff --git a/src/emulator/BUS/systemBus.cpp b/src/emulator/BUS/systemBus.cpp index 6766d30..8d26b44 100644 --- a/src/emulator/BUS/systemBus.cpp +++ b/src/emulator/BUS/systemBus.cpp @@ -44,8 +44,8 @@ void SystemBus::setDiskModule(ModuleInterface* module){ this->diskModule = module; } -void SystemBus::setScreenModule(ModuleInterface* module){ - this->screenModule = module; +void SystemBus::setDisplayModule(ModuleInterface* module){ + this->displayModule = module; } ModuleInterface* SystemBus::getMemoryModule(){ @@ -61,7 +61,7 @@ ModuleInterface* SystemBus::getDiskModule(){ } ModuleInterface* SystemBus::getScreenModule(){ - return this->screenModule; + return this->displayModule; } void SystemBus::execute(){ @@ -85,9 +85,18 @@ void SystemBus::execute(){ diskModule->execute(control, address, data); } + + else if((control >= SCREENSTART) && (control <= SCREENEND)){ + if(displayModule == NULL) { + std::cerr << "Display module not set\n"; + return; + } + + displayModule->execute(control, address, data); + } else{ - std::cout << "Invalid control signal : " << control << std::endl; + std::cout << "Invalid control signal : " << static_cast(control) << std::endl; } } \ No newline at end of file diff --git a/src/emulator/BUS/systemBus.hpp b/src/emulator/BUS/systemBus.hpp index 12fa3d3..2bb1a0a 100644 --- a/src/emulator/BUS/systemBus.hpp +++ b/src/emulator/BUS/systemBus.hpp @@ -34,10 +34,15 @@ typedef unsigned char byte; #define DISKEND DISKWRITE // Info about the IO's SCREEN instructions -#define SCREENSTART SCREENWRITE -#define SCREENEND SCREENWRITE - -#define SCREENWRITE 0xF7 //Bus requesting to write to SCREEN; Bus write to SCREEN +#define SETCRDX 0xF7 //Setting X coordinate to display +#define SETCRDY 0xF8 //Setting Y coordinate to display +#define PXDSPL 0xF9 //Displaying pixel +#define TXTDSPL 0xFA //Displaying text +#define CLRDSPL 0xFB //Clearing display +#define CLRPXL 0xFC //Clearing pixel +#define PRNTDSPL 0xFD //Printing display +#define SCREENSTART SETCRDX +#define SCREENEND PRNTDSPL class SystemBus{ @@ -50,7 +55,7 @@ class SystemBus{ ModuleInterface* memoryModule; ModuleInterface* cpuModule; ModuleInterface* diskModule; - ModuleInterface* screenModule; + ModuleInterface* displayModule; public: SystemBus(); @@ -64,7 +69,7 @@ class SystemBus{ void setMemoryModule(ModuleInterface* module); void setCpuModule(ModuleInterface* module); void setDiskModule(ModuleInterface* module); - void setScreenModule(ModuleInterface* module); + void setDisplayModule(ModuleInterface* module); ModuleInterface* getMemoryModule(); ModuleInterface* getCpuModule(); diff --git a/src/emulator/IO/display/display.cpp b/src/emulator/IO/display/display.cpp new file mode 100644 index 0000000..c361a41 --- /dev/null +++ b/src/emulator/IO/display/display.cpp @@ -0,0 +1,82 @@ +#include "display.hpp" + +Display::Display(SystemBus &bus) : IOInterface(bus){ + this->displayBuffer = std::vector>(displaySize, std::vector(displaySize, emptyChar)); +} + +void Display::write(byte data){ +} + +void Display::read(long address){ +} + +void Display::displayText(byte address, byte size){ + + std::string text = ""; + for(int i = 0; i < size; i++){ + this->getBus()->writeAddress(address+i); + this->getBus()->writeControl(MEMREAD); + this->getBus()->execute(); + text += static_cast(this->getBus()->readData()); + } + + this->displayBuffer[y][x] = text; +} + +void Display::displayPixel(){ + this->displayBuffer[y][x] = "X"; +} + +void Display::clearDisplay(){ + this->displayBuffer = std::vector>(displaySize, std::vector(displaySize, emptyChar)); +} + +void Display::clearPixel(){ + this->displayBuffer[y][x] = emptyChar; +} + +void Display::setX(int x){ + this->x = x; +} + +void Display::setY(int y){ + this->y = y; +} + +byte Display::execute(byte control, byte address, byte data){ + switch(control){ + case SETCRDX: + this->setX(static_cast(data)); + break; + case SETCRDY: + this->setY(static_cast(data)); + break; + case PXDSPL: + this->displayPixel(); + break; + case TXTDSPL: + this->displayText(address, data); + break; + case CLRDSPL: + clearDisplay(); + break; + case CLRPXL: + clearPixel(); + break; + case PRNTDSPL: + printDisplay(); + break; + } + + return 0; +} + +void Display::printDisplay(){ + for(const auto& row: this->displayBuffer){ + for(const auto& col: row){ + std::cout << col; + } + std::cout << std::endl; + } + std::cout << std::endl; +} \ No newline at end of file diff --git a/src/emulator/IO/display/display.hpp b/src/emulator/IO/display/display.hpp new file mode 100644 index 0000000..87c1bb8 --- /dev/null +++ b/src/emulator/IO/display/display.hpp @@ -0,0 +1,46 @@ +#pragma once + +#include "../IO.hpp" +#include "../../BUS/systemBus.hpp" +#include +#include + +class Display : public IOInterface{ + + private: + //Display characters (vector) + std::vector> displayBuffer; + + int x = 0; + int y = 0; + + int displaySize = 64; + std::string emptyChar = "."; + + public: + Display(SystemBus &bus); + + void displayText(byte address, byte size); + + void displayPixel(); + + void clearDisplay(); + + void clearPixel(); + + void setX(int x); + void setY(int y); + + //Write to display + virtual void write(byte data) override; + + //Read from display + virtual void read(long address) override; + + //Execute IO operation + virtual byte execute(byte control, byte address, byte data) override; + + //Print display + void printDisplay(); + +}; \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 564a2af..dd0bbc6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,6 +5,7 @@ #include "./emulator/memory/memory.hpp" #include "./emulator/BUS/systemBus.hpp" #include "./emulator/IO/disk/disk.hpp" +#include "./Emulator/IO/display/display.hpp" #include typedef unsigned char byte; @@ -33,6 +34,9 @@ int main(int argc, char* argv[]){ Disk* disk = new Disk(*bus); bus->setDiskModule(disk); + Display* display = new Display(*bus); + bus->setDisplayModule(display); + Cpu* cpu = new Cpu(*bus); char* filePath = argv[2]; From b8da10279476162c19f2a5c1364c009c210921b2 Mon Sep 17 00:00:00 2001 From: 710lucas Date: Sat, 3 Aug 2024 14:30:40 -0300 Subject: [PATCH 2/5] Adding raylib --- Makefile | 7 ++-- src/emulator/IO/display/display.cpp | 56 +++++++++++++++++++++++------ src/emulator/IO/display/display.hpp | 14 +++++++- src/emulator/cpu.cpp | 12 ++++--- src/emulator/cpu.h | 2 +- src/main.cpp | 27 +++++++++++++- 6 files changed, 97 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index aa425d7..126906b 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,10 @@ # g++ ./src/main.cpp ./src/emulator/emulator.cpp -o Emulator SRCS := $(shell find src -name '*.cpp') - +CFLAGS := $(foreach src,$(SRCS),-c $(src)) # Define o alvo padrĂ£o all: - g++ $(SRCS) -g -o Emulator + g++ $(SRCS) -g -o Emulator -lraylib -lgdi32 -lwinmm + +clean: + rm Emulator \ No newline at end of file diff --git a/src/emulator/IO/display/display.cpp b/src/emulator/IO/display/display.cpp index c361a41..5154746 100644 --- a/src/emulator/IO/display/display.cpp +++ b/src/emulator/IO/display/display.cpp @@ -1,7 +1,8 @@ #include "display.hpp" +#include "../../../fonts/roboto.h" Display::Display(SystemBus &bus) : IOInterface(bus){ - this->displayBuffer = std::vector>(displaySize, std::vector(displaySize, emptyChar)); + // this->displayBuffer = std::vector>(window.getSize().y, std::vector(window.getSize().x, emptyChar)); } void Display::write(byte data){ @@ -20,19 +21,44 @@ void Display::displayText(byte address, byte size){ text += static_cast(this->getBus()->readData()); } - this->displayBuffer[y][x] = text; + this->displayTexts.push_back({text, x, y}); + + std::cout<<"Displaying text\n"; + } void Display::displayPixel(){ - this->displayBuffer[y][x] = "X"; + // sf::RectangleShape pixel(sf::Vector2f(1, 1)); + // pixel.setFillColor(sf::Color::White); + // pixel.setPosition(x, y); + // window.draw(pixel); + // this->displayBuffer[y][x] = "X"; + + std::cout<<"Displaying pixel\n"; + + Rectangle pixel = {x, y, 1, 1}; + + this->displayRects.push_back(pixel); } void Display::clearDisplay(){ - this->displayBuffer = std::vector>(displaySize, std::vector(displaySize, emptyChar)); + ClearBackground(WHITE); + // this->displayBuffer = std::vector>(window.getSize().y, std::vector(window.getSize().x, emptyChar)); } void Display::clearPixel(){ - this->displayBuffer[y][x] = emptyChar; + + for(int i = 0; i < displayRects.size(); i++){ + + Rectangle rect = displayRects[i]; + + if(rect.x == x && rect.y == y){ + displayRects.erase(displayRects.begin() + i); + break; + } + } + + // this->displayBuffer[y][x] = emptyChar; } void Display::setX(int x){ @@ -72,11 +98,19 @@ byte Display::execute(byte control, byte address, byte data){ } void Display::printDisplay(){ - for(const auto& row: this->displayBuffer){ - for(const auto& col: row){ - std::cout << col; - } - std::cout << std::endl; +} + +void Display::displayLoop(){ + ClearBackground(WHITE); + BeginDrawing(); + + for(const auto& rect: displayRects){ + DrawRectangle(rect.x, rect.y, rect.width*(GetScreenWidth()/64), rect.height*(GetScreenHeight()/64), BLACK); + } + + for(const auto& text: displayTexts){ + DrawText(text.text.c_str(), text.x, text.y, 20*(GetScreenHeight()/64), BLACK); } - std::cout << std::endl; + + EndDrawing(); } \ No newline at end of file diff --git a/src/emulator/IO/display/display.hpp b/src/emulator/IO/display/display.hpp index 87c1bb8..5ca7e93 100644 --- a/src/emulator/IO/display/display.hpp +++ b/src/emulator/IO/display/display.hpp @@ -4,12 +4,22 @@ #include "../../BUS/systemBus.hpp" #include #include +#include "raylib.h" + +struct Text{ + std::string text; + int x; + int y; +}; + class Display : public IOInterface{ private: //Display characters (vector) std::vector> displayBuffer; + std::vector displayRects; + std::vector displayTexts; int x = 0; int y = 0; @@ -18,7 +28,7 @@ class Display : public IOInterface{ std::string emptyChar = "."; public: - Display(SystemBus &bus); + Display(SystemBus &bus); void displayText(byte address, byte size); @@ -43,4 +53,6 @@ class Display : public IOInterface{ //Print display void printDisplay(); + void displayLoop(); + }; \ No newline at end of file diff --git a/src/emulator/cpu.cpp b/src/emulator/cpu.cpp index 13bc50e..5a02cc7 100644 --- a/src/emulator/cpu.cpp +++ b/src/emulator/cpu.cpp @@ -51,9 +51,9 @@ Cpu::Cpu(SystemBus &bus) : bus (bus){ Cpu(); } -void Cpu::cycle(){ +int Cpu::cycle(){ - while(true){ + // Maybe put this in main this->bus.writeControl(MEMREAD); @@ -65,13 +65,14 @@ void Cpu::cycle(){ if(instruction == NULL){ std::cerr<<"Invalid instruction" << static_cast(instruction) << "\n"; - break; + return -1; } int result = executeInstruction(instruction); if(result == 1){ - break; + std::cout<<"Finished\n"; + return 1; } this->bus.execute(); @@ -79,8 +80,9 @@ void Cpu::cycle(){ // Run IO cycle pc+=6; + std::cout<<"Cycle\n"; - } + return 0; } diff --git a/src/emulator/cpu.h b/src/emulator/cpu.h index 8be25b8..398971b 100644 --- a/src/emulator/cpu.h +++ b/src/emulator/cpu.h @@ -52,6 +52,6 @@ class Cpu{ void loadIntoMemory(byte toLoad[]); byte getOperandValue(byte lower, byte higher); int executeInstruction(byte instruction); - void cycle(); + int cycle(); }; diff --git a/src/main.cpp b/src/main.cpp index dd0bbc6..0199230 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,11 +34,17 @@ int main(int argc, char* argv[]){ Disk* disk = new Disk(*bus); bus->setDiskModule(disk); + std::cout<<"Inicializando janela\n"; + + + std::cout<<"janela inicializada\n"; + Display* display = new Display(*bus); bus->setDisplayModule(display); Cpu* cpu = new Cpu(*bus); + char* filePath = argv[2]; std::ifstream file(filePath, std::ios::binary); @@ -67,7 +73,26 @@ int main(int argc, char* argv[]){ file.close(); - cpu->cycle(); + std::cout<<"Tudo inicializado certo\n"; + + SetConfigFlags(FLAG_WINDOW_RESIZABLE); + InitWindow(64, 64, "RISC-I Emulator"); + + int result = 0; + + ClearBackground(WHITE); + while(!WindowShouldClose()){ + + if(result == 0){ + result = cpu->cycle(); + } + + display->displayLoop(); + + } + + CloseWindow(); + } From 2a99c826c2d769a52f9d78afea38d870902f9217 Mon Sep 17 00:00:00 2001 From: 710lucas Date: Sat, 3 Aug 2024 21:28:59 -0300 Subject: [PATCH 3/5] removing PRNTDSPL funciton --- src/emulator/BUS/systemBus.hpp | 3 +-- src/emulator/IO/display/display.cpp | 5 ----- src/emulator/IO/display/display.hpp | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/emulator/BUS/systemBus.hpp b/src/emulator/BUS/systemBus.hpp index 2bb1a0a..45a7e5a 100644 --- a/src/emulator/BUS/systemBus.hpp +++ b/src/emulator/BUS/systemBus.hpp @@ -40,9 +40,8 @@ typedef unsigned char byte; #define TXTDSPL 0xFA //Displaying text #define CLRDSPL 0xFB //Clearing display #define CLRPXL 0xFC //Clearing pixel -#define PRNTDSPL 0xFD //Printing display #define SCREENSTART SETCRDX -#define SCREENEND PRNTDSPL +#define SCREENEND CLRPXL class SystemBus{ diff --git a/src/emulator/IO/display/display.cpp b/src/emulator/IO/display/display.cpp index 5154746..5cf1359 100644 --- a/src/emulator/IO/display/display.cpp +++ b/src/emulator/IO/display/display.cpp @@ -89,16 +89,11 @@ byte Display::execute(byte control, byte address, byte data){ case CLRPXL: clearPixel(); break; - case PRNTDSPL: - printDisplay(); - break; } return 0; } -void Display::printDisplay(){ -} void Display::displayLoop(){ ClearBackground(WHITE); diff --git a/src/emulator/IO/display/display.hpp b/src/emulator/IO/display/display.hpp index 5ca7e93..5a0da85 100644 --- a/src/emulator/IO/display/display.hpp +++ b/src/emulator/IO/display/display.hpp @@ -50,9 +50,6 @@ class Display : public IOInterface{ //Execute IO operation virtual byte execute(byte control, byte address, byte data) override; - //Print display - void printDisplay(); - void displayLoop(); }; \ No newline at end of file From 0c359e5cf8df384f41a9f13b86d23e9897c436bc Mon Sep 17 00:00:00 2001 From: 710lucas Date: Sat, 3 Aug 2024 21:31:49 -0300 Subject: [PATCH 4/5] cleaning code --- src/emulator/IO/display/display.cpp | 13 ------------- src/emulator/IO/display/display.hpp | 4 ---- src/emulator/cpu.cpp | 1 - 3 files changed, 18 deletions(-) diff --git a/src/emulator/IO/display/display.cpp b/src/emulator/IO/display/display.cpp index 5cf1359..578e748 100644 --- a/src/emulator/IO/display/display.cpp +++ b/src/emulator/IO/display/display.cpp @@ -1,8 +1,6 @@ #include "display.hpp" -#include "../../../fonts/roboto.h" Display::Display(SystemBus &bus) : IOInterface(bus){ - // this->displayBuffer = std::vector>(window.getSize().y, std::vector(window.getSize().x, emptyChar)); } void Display::write(byte data){ @@ -23,18 +21,9 @@ void Display::displayText(byte address, byte size){ this->displayTexts.push_back({text, x, y}); - std::cout<<"Displaying text\n"; - } void Display::displayPixel(){ - // sf::RectangleShape pixel(sf::Vector2f(1, 1)); - // pixel.setFillColor(sf::Color::White); - // pixel.setPosition(x, y); - // window.draw(pixel); - // this->displayBuffer[y][x] = "X"; - - std::cout<<"Displaying pixel\n"; Rectangle pixel = {x, y, 1, 1}; @@ -43,7 +32,6 @@ void Display::displayPixel(){ void Display::clearDisplay(){ ClearBackground(WHITE); - // this->displayBuffer = std::vector>(window.getSize().y, std::vector(window.getSize().x, emptyChar)); } void Display::clearPixel(){ @@ -58,7 +46,6 @@ void Display::clearPixel(){ } } - // this->displayBuffer[y][x] = emptyChar; } void Display::setX(int x){ diff --git a/src/emulator/IO/display/display.hpp b/src/emulator/IO/display/display.hpp index 5a0da85..4a4e10c 100644 --- a/src/emulator/IO/display/display.hpp +++ b/src/emulator/IO/display/display.hpp @@ -16,16 +16,12 @@ struct Text{ class Display : public IOInterface{ private: - //Display characters (vector) - std::vector> displayBuffer; std::vector displayRects; std::vector displayTexts; int x = 0; int y = 0; - int displaySize = 64; - std::string emptyChar = "."; public: Display(SystemBus &bus); diff --git a/src/emulator/cpu.cpp b/src/emulator/cpu.cpp index 5a02cc7..9aaa2df 100644 --- a/src/emulator/cpu.cpp +++ b/src/emulator/cpu.cpp @@ -80,7 +80,6 @@ int Cpu::cycle(){ // Run IO cycle pc+=6; - std::cout<<"Cycle\n"; return 0; From 40668cbbbf38f97512be010279c12f2fb632b046 Mon Sep 17 00:00:00 2001 From: 710lucas Date: Sat, 3 Aug 2024 22:26:16 -0300 Subject: [PATCH 5/5] Cleaning code and updating example: removing unecessary instructions --- .../{testingDisplay => testingDisplay.txt} | 23 +++---------------- src/emulator/cpu.cpp | 1 - 2 files changed, 3 insertions(+), 21 deletions(-) rename Examples/{testingDisplay => testingDisplay.txt} (67%) diff --git a/Examples/testingDisplay b/Examples/testingDisplay.txt similarity index 67% rename from Examples/testingDisplay rename to Examples/testingDisplay.txt index ecc7e6e..a2e5f86 100644 --- a/Examples/testingDisplay +++ b/Examples/testingDisplay.txt @@ -1,26 +1,13 @@ -//Adding FD to register 0 -//FD: print display -ADD 0xFFFD 0xFF00 0x0000 - -//Telling bus to print display -//0xFF000 -> no address lane -//0xFF000 -> no data lane -//0x0000 -> control = register[0] -WBUS 0xFF00 0xFF00 0x0000 - //Adding F9 to register 1 //F9: Display pixel +//byte 0 ADD 0xFFF9 0xFF00 0x0001 //Telling bus to add pixel to display +//byte 6 WBUS 0xFF00 0xFF00 0x0001 -//Telling bus to print the display again -//this will show the pixel in the coordinates (0,0) -WBUS 0xFF00 0xFF00 0x0000 - - -//I'll write RISC-I in memory, letter by letter +//I'll write "RISC-I" in memory, letter by letter //Adding R to register 2 //R = 0x52 in ACII @@ -81,8 +68,4 @@ ADD 0xFFFA 0xFF00 0x0003 //Control: 0x0003 WBUS 0xFF06 0xFFA0 0x0003 -//Telling bus to print the display again -//this will print the text in the coordinates (0,0) -WBUS 0xFF00 0xFF00 0x0000 - STP 0x0000 0x0000 0x0000 \ No newline at end of file diff --git a/src/emulator/cpu.cpp b/src/emulator/cpu.cpp index 9aaa2df..782859f 100644 --- a/src/emulator/cpu.cpp +++ b/src/emulator/cpu.cpp @@ -71,7 +71,6 @@ int Cpu::cycle(){ int result = executeInstruction(instruction); if(result == 1){ - std::cout<<"Finished\n"; return 1; }