diff --git a/examples/sdl/src/main.rs b/examples/sdl/src/main.rs index ff54cf4831e51c9afa070deabe043ccd5edc2c95..965230e0d64150d2b87907dd290b1cbab3501b61 100644 --- a/examples/sdl/src/main.rs +++ b/examples/sdl/src/main.rs @@ -81,7 +81,7 @@ fn main() { // creates a new Game Boy instance and loads both the boot ROM // and the initial game ROM to "start the engine" let mut game_boy = GameBoy::new(); - game_boy.load_boot_dmg_bootix(); + game_boy.load_boot_static(); game_boy.load_rom_file("../../res/roms.prop/tetris.gb"); //game_boy.load_rom_file("../../res/roms.prop/alleyway.gb"); @@ -107,6 +107,8 @@ fn main() { // on the number of visual ticks since beginning counter = counter.wrapping_add(1); + // obtains an event from the SDL sub-system to be + // processed under the current emulation context while let Some(event) = graphics.event_pump.poll_event() { match event { Event::Quit { .. } => break 'main, diff --git a/examples/web/index.html b/examples/web/index.html index faa20ad4ca8c3c2eafbcfd30e29afb08fb62382b..a60d7232c845f8c11bea32ab4cc94635ec26607a 100644 --- a/examples/web/index.html +++ b/examples/web/index.html @@ -112,7 +112,7 @@ <img src="res/marker.svg" alt="marker" /><span>Theme</span> </span> <span id="button-upload" class="tiny-button border padded file"> - <img src="res/upload.svg" alt="upload" /><span>Upload ROM</span> + <img src="res/upload.svg" alt="upload" /><span>Load ROM</span> <input type="file" id="button-upload-file" name="button-upload-file" accept=".ch8"> </span> </div> diff --git a/examples/web/index.ts b/examples/web/index.ts index 13442109f6c3807db05a83b22565ef8349e8d54b..68cd9aaa81b17b2aca0436a3fd2d004a8dc778ef 100644 --- a/examples/web/index.ts +++ b/examples/web/index.ts @@ -288,7 +288,7 @@ const start = async ({ // resets the Game Boy engine to restore it into // a valid state ready to be used //state.gameBoy.reset_hard(); @todo - state.gameBoy.load_boot_dmg(); + state.gameBoy.load_boot_static(); state.gameBoy.load_rom(romData); // updates the name of the currently selected engine diff --git a/src/gb.rs b/src/gb.rs index d81ea62b5eced164f10a34c0fe7acea8314efccb..e7037be1daeffd75daeeda3918960b7da31490c8 100644 --- a/src/gb.rs +++ b/src/gb.rs @@ -82,7 +82,7 @@ impl GameBoy { } pub fn load_boot_default(&mut self) { - self.load_boot_dmg_f(); + self.load_boot_dmg_bootix_f(); } pub fn load_boot_dmg(&mut self) { @@ -101,6 +101,10 @@ impl GameBoy { self.load_boot(&MGB_BOOTIX); } + pub fn load_boot_static(&mut self) { + self.load_boot_dmg_bootix(); + } + pub fn frame_buffer_eager(&mut self) -> Vec<u8> { self.frame_buffer().to_vec() }