CODE-DMG
 __________________
|-|--------------|-|
|  ______________  |
| |  __________  | |
| | |          | | |
| |·|          | | |
| | |          | | |
| | |__________| | |
| |_____________/  |
|   _  GAMEBOY     |
| _| |_         () |
||_   _|       ()  |
|  |_|             |
|       / /   \\\ /
|________________/

Thank you for downloading CODE-DMG! Please keep fall_back.gb by the executable, and the run the emulator from the terminal that's
current working directory is where the executable is!

Controls
(A) = Z
(B) = X
[START] = [ENTER]
[SELECT] = [RSHIFT]
D-Pad = ArrowKeys

Usage
For the most basics usage: `CODE-DMG --dmg <string:rom>` or `./CODE-DMG --dmg <string:rom>`. Terminal should be at the 
location of the application as the current working directory when calling CODE-DMG. Save files are supported (experimental), 
a `.sav` file will be generated in the same location as the ROM. This `.sav` file can work between emulators like BGB. 
Currently CODE-DMG support MBC0/ROM Only roms, as well as experimental MBC1, MBC3 (no RTC), and MB5 (no rumble).

Flags
CODE-DMG for now is only runnable through the CLI. Executing the executable directly will rely on the fall back rom. 
Note: these flags can be passed in any order, and in any combination.

--dmg <string:path>, --dmg: Starts up the emulator given a rom file (Default mode. No rom given, fall back is default)
--json <string>: Runs a CPU test for a instruction given a JSON file in test/v1
-b <string:path>, --bootrom <string:path>: Loads custom bootrom path than default. (dmg_boot.bin is default)
-s <int>, --scale <int>: Scale window size by factor (2 is default)
-f, --fps: Enables FPS counter (off is default)
-rl, --raylib-log: Enables Raylib logs (off is default)
-p <string>, --palette <string>: Changes the 2bpp palette given name (dmg is default)
-a, --about: Shows about
-v, --version: Shows version number
-h, --help: Shows help screen

Bootrom
The bootrom of the Gameboy is first program that is ran by the Gameboy which sets up register and memory value, and also performs 
a validity check on the rom. This better known as the Nintendo logo scrolling down when you power on a Gameboy. 
Optional, but it is recommended you provide the bootrom. It must be named dmg_boot.bin and be placed in root of executable. 
However, even without a bootrom, roms will still work.

Fallback ROM
The fallback rom, fall_back.gb, is a custom ROM I made in GBZ80 assembly as a fall back rom the emulator can run. 
This rom purposely has invalid header data, which if provided a bootrom, can emulate what happens when you turn on a 
Gameboy without a game. If a bootrom is not provided, and the fall back rom is ran, then you will see a screen with a 
message saying "This should not be seen on a real DMG or emu with bootrom checks"

Check out the Github for more information: https://github.com/BotRandomness/CODE-DMG

Made with <3 by Bot Randomness
:)