Skip to content

Commit

Permalink
Document --mode and default it to CGB
Browse files Browse the repository at this point in the history
  • Loading branch information
alloncm committed Dec 9, 2024
1 parent 0923eac commit 125a31f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ See - [RealMagenBoy](docs/RealMagenBoy.md)
* `--file-audio` - Saves the audio to a file
* `--full-screen` - Full screen mode
* `--no-vsync` - Disable vsync
* `--bootrom [path to bootrom file]` - Specify the path for a bootrom (If not specified the emualtor will look for `dmg_boot.bin` at the cwd)
* `--bootrom [path to bootrom file]` - Specify the path for a bootrom, also used to detect the system type to emulate
* `--rom-menu [path to roms folder]` - Opens an interactive dialog uopn start to choose the rom from the folder
Choose a game with the Joypad bindings (Dpad and A to confirm)
* `--mode [mahcine mode]` - Override the auto machine detection for the game (mode can be: `CGB` - Gameboy color | `DMG` - Original Gameboy | `ANY` - default)
* `--mode [mahcine type]` - Sets the machine type to emualte in case of a missing bootrom (mode can be: `CGB` - Gameboy color | `DMG` - Original Gameboy) defaults to `CGB`
* `--shutdown-rpi` - Requires `rpi` feature, shutdown the RPi upon shutdown of the program

### Raspberry Pi Baremetal
Expand Down
4 changes: 2 additions & 2 deletions common/src/initialization.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use log::info;

use magenboy_core::{JoypadProvider, AudioDevice, Bootrom, GBC_BOOT_ROM_SIZE, GB_BOOT_ROM_SIZE, GameBoy};
use magenboy_core::{Mode, AudioDevice, Bootrom, GameBoy, JoypadProvider, GBC_BOOT_ROM_SIZE, GB_BOOT_ROM_SIZE};
#[cfg(feature = "dbg")]
use magenboy_core::debugger::DebuggerInterface;

Expand Down Expand Up @@ -60,7 +60,7 @@ pub fn init_and_run_gameboy(
mode
}
else{
std::panic!("Could not infer --mode flag")
Mode::CGB
};
GameBoy::new_with_mode(mbc, joypad_provider, audio_devices, spsc_gfx_device, mode, #[cfg(feature = "dbg")] dui)
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub mod utils;
pub mod debugger;

pub use {
machine::gameboy::GameBoy,
machine::{gameboy::GameBoy, Mode},
ppu::gfx_device::*,
apu::audio_device::AudioDevice,
keypad::joypad_provider::JoypadProvider,
Expand Down

0 comments on commit 125a31f

Please sign in to comment.