Skip to content

Portable GameBoy-emulator built in c++ further informations in readme.txt

Notifications You must be signed in to change notification settings

Xpository/Gameboy-Emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xpository - Multi retro-console emulator.

๐Ÿ—‚๏ธ Table of Contents
  1. โš’๏ธ TODO
  2. ๐Ÿ“ฅ Updates
    1. 1๏ธโƒฃ First Update
    2. 2๏ธโƒฃ Second Update
    3. 3๏ธโƒฃ Third Update

TODO

  • CPU Base
  • Memory
    • Memory map
    • Read and write
  • Cartridge read
    • Read header
    • Verify header
  • Place everything into CPU.cpp
  • Graphics
    • OpenGL
    • Sprite Rendering
  • Fetch
    • Execute Instructions
  • Optimization
    • Optimize most of the code

Updates

Started 11/03/24

ITALIAN ๐Ÿ‡ฎ๐Ÿ‡น

Progetto creato al fine di consegnarlo come capolavoro per la piattaforma Unica Istruzione. L'idea del progetto sarebbe un programma che permette di scaricare ed emulare giochi retrรฒ in modo totalmente gratuito.

Per ora le risorse sono tutte impiegate sull'apprendimento e lo sviluppo di un primo emulatore, quello per Gameboyโ„ข

ENGLISH ๐Ÿ‡บ๐Ÿ‡ธ

Project created to be uploaded on the Unica Istruzione web site, as part of the capolavoro school project. The base idead of the project is a program that lets you download and emulate games from different retro consoles for free.

For now all resources are used to learn and develop the first emulator that is for Gameboyโ„ข


Update 14/04/24

ITALIAN ๐Ÿ‡ฎ๐Ÿ‡น

Dati gli svariati problemi con i launch.json e tasks.json vi forniamo gli args usati da noi durante lo sviluppo. Pur essendo una soluzione primitiva e non scalabile, e' il meglio che possiamo fare per ora.

ENGLISH ๐Ÿ‡บ๐Ÿ‡ธ

Due to many issues we encountered regarding launch.json and task.json, we provide you with the args used by us.
It is an early-stage of development as it is the best we can do for now.

LAUNCH.JSON

{
    "version": "2.0.0",
    "configurations": [
        {
            "name": "Debug C/C++",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/main.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\Program Files (x86)\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build all files"
        },
        {
            "name": "C/C++: g++.exe build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/main.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\Program Files (x86)\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file"
        }
    ]
}

TASKS.JSON -> Args

"args": [
        "-fdiagnostics-color=always",
        "-g",
        "${workspaceFolder}/headers/*.hpp",
        "${workspaceFolder}/cpp/cartridge.cpp",
        "${workspaceFolder}/cpp/graphics.cpp",
        "${workspaceFolder}/cpp/LR35902.cpp",
        "${workspaceFolder}/cpp/memory.cpp",
        "${workspaceFolder}/cpp/opcodes.cpp",
        "${workspaceFolder}/main.cpp",
        "-o",
        "${workspaceFolder}/build/main.exe",
        "-I",
        "C:/C++ Libraries/OpenGL/glfw-3.4.bin.WIN64/include/",
        "-LC:/C++ Libraries/OpenGL/glfw-3.4.bin.WIN64/lib-mingw-w64",
        "-lglfw3",
        "-lopengl32", // Aggiungi questa linea se stai usando funzioni OpenGL che richiedono linking esplicito
        "-lgdi32",
        "-luser32",
        "-lkernel32"
    ],

C_CPP_PROPERTIES.JSON

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "C:\\OpenGL\\glfw-3.4.bin.WIN64\\include",
                "C:\\OpenGL\\glad\\include"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.22621.0",
            "compilerPath": "C:/Program Files (x86)/mingw64/bin/g++.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-gcc-x64"
        }
    ],
    "version": 4
}

Update 16/04/24

Come installare OpenGL (SOLO WINDOWS)

Qui di seguito troverete i passaggi per l'installazione di OpenGL e Glad.

  1. Scaricare la libreria GLFW per OpenGL e cliccare su 64-bit Windows binaries
  2. Scaricare Glad. Sul sito selezionare i seguenti parametri
    • Language: C/C++
    • Specification: OpenGL
    • Profile: Core
    • API:
      1. gl -> 3.3
      2. gles1 -> None
      3. gles2 -> None
      4. gles3 -> None
    • Options: spuntare Generate a loader
    • Infine cliccare Generate
  3. Estrarre le cartelle nel seguente percorso, ovviamente creare la cartella apposita:
    • C:\OpenGL\
  4. Per Glad estrarre le cartelle include e src dentro a una cartella chiamata glad
  5. Inserire il file glfw3.dll nella stessa directory in cui viene buildato il programma (.exe)

L'albero delle cartelle dovrebbe assomigliare a questo

C:.
โ”œโ”€โ”€โ”€glad
โ”‚   โ”œโ”€โ”€โ”€include
โ”‚   โ”‚   โ”œโ”€โ”€โ”€glad
โ”‚   โ”‚   โ””โ”€โ”€โ”€KHR
โ”‚   โ””โ”€โ”€โ”€src
โ””โ”€โ”€โ”€glfw-3.4.bin.WIN64
    โ”œโ”€โ”€โ”€docs
    โ”‚   โ””โ”€โ”€โ”€html
    โ”‚       โ””โ”€โ”€โ”€search
    โ”œโ”€โ”€โ”€include
    โ”‚   โ””โ”€โ”€โ”€GLFW
    โ”œโ”€โ”€โ”€lib-mingw-w64
    โ”œโ”€โ”€โ”€lib-static-ucrt
    โ”œโ”€โ”€โ”€lib-vc2013
    โ”œโ”€โ”€โ”€lib-vc2015
    โ”œโ”€โ”€โ”€lib-vc2017
    โ”œโ”€โ”€โ”€lib-vc2019
    โ””โ”€โ”€โ”€lib-vc2022

How to install OpenGL (WINDOWS ONLY)

Here you'll find the steps to install OpenGL and Glad.

  1. Download the GLFW library by clicking 64-bit Windows binaries
  2. Download Glad. In the site select the following parameters
    • Language: C/C++
    • Specification: OpenGL
    • Profile: Core
    • API:
      1. gl -> 3.3
      2. gles1 -> None
      3. gles2 -> None
      4. gles3 -> None
    • Options: tick Generate a loader
    • Finally click on Generate
  3. Extract the folders at the following location, obviously create the dedicated folder:
    • C:\OpenGL\
  4. For Glad extract the include and src folders inside a newly created folder named glad
  5. Copy the glfw3.dll file in the same directory that contains the built program (.exe)

The directory tree should look like this:

C:.
โ”œโ”€โ”€โ”€glad
โ”‚   โ”œโ”€โ”€โ”€include
โ”‚   โ”‚   โ”œโ”€โ”€โ”€glad
โ”‚   โ”‚   โ””โ”€โ”€โ”€KHR
โ”‚   โ””โ”€โ”€โ”€src
โ””โ”€โ”€โ”€glfw-3.4.bin.WIN64
    โ”œโ”€โ”€โ”€docs
    โ”‚   โ””โ”€โ”€โ”€html
    โ”‚       โ””โ”€โ”€โ”€search
    โ”œโ”€โ”€โ”€include
    โ”‚   โ””โ”€โ”€โ”€GLFW
    โ”œโ”€โ”€โ”€lib-mingw-w64
    โ”œโ”€โ”€โ”€lib-static-ucrt
    โ”œโ”€โ”€โ”€lib-vc2013
    โ”œโ”€โ”€โ”€lib-vc2015
    โ”œโ”€โ”€โ”€lib-vc2017
    โ”œโ”€โ”€โ”€lib-vc2019
    โ””โ”€โ”€โ”€lib-vc2022

The team Alessandro Landi @RehTrizZ Ivan Casotti @Cyb3s Alessandro Enzo Gori @AleBitCode Joseph Portera @0hM1C1uf1

About

Portable GameBoy-emulator built in c++ further informations in readme.txt

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •