Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
- Add comment for the menu mutex
- Fix cart memory size
  • Loading branch information
alloncm committed Jan 15, 2025
1 parent efb4027 commit 5c92374
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/src/initialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub fn init_and_run_gameboy(
EMULATOR_STATE.running.store(true, std::sync::atomic::Ordering::Relaxed);
while EMULATOR_STATE.running.load(std::sync::atomic::Ordering::Relaxed){
if !EMULATOR_STATE.pause.load(std::sync::atomic::Ordering::SeqCst){
// Locking the state mutex in order to signal the menu that we are cycling a frame now
let state = &EMULATOR_STATE;
let _mutex_ctx = state.state_mutex.lock().unwrap();
gameboy.cycle_frame();
Expand Down
2 changes: 1 addition & 1 deletion core/src/mmu/carts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn get_ram_size(ram_size_register:u8)->usize{
match ram_size_register{
0x0=>0,
0x1=>0x800, // Unofficial - Undefined according to official docs
0x2=>0x4000,
0x2=>0x2000,
0x3=>0x8000,
0x4=>0x2_0000,
0x5=>0x1_0000,
Expand Down

0 comments on commit 5c92374

Please sign in to comment.