Update dependencies and rust version

This commit is contained in:
2025-03-04 20:46:16 -05:00
parent fddc7bdd0e
commit 9a34856c2b
25 changed files with 510 additions and 488 deletions
+7 -11
View File
@@ -1,6 +1,6 @@
use std::{ffi::c_void, ptr, slice};
use anyhow::{anyhow, Result};
use anyhow::{Result, anyhow};
use bitflags::bitflags;
use num_derive::{FromPrimitive, ToPrimitive};
use serde::{Deserialize, Serialize};
@@ -91,7 +91,7 @@ type OnWrite = extern "C" fn(
) -> c_int;
#[link(name = "vb")]
extern "C" {
unsafe extern "C" {
#[link_name = "vbEmulate"]
fn vb_emulate(sim: *mut VB, cycles: *mut u32) -> c_int;
#[link_name = "vbEmulateEx"]
@@ -170,7 +170,7 @@ extern "C" {
fn vb_write(sim: *mut VB, address: u32, _type: VBDataType, value: i32) -> i32;
}
#[no_mangle]
#[unsafe(no_mangle)]
extern "C" fn on_frame(sim: *mut VB) -> c_int {
// SAFETY: the *mut VB owns its userdata.
// There is no way for the userdata to be null or otherwise invalid.
@@ -179,7 +179,7 @@ extern "C" fn on_frame(sim: *mut VB) -> c_int {
1
}
#[no_mangle]
#[unsafe(no_mangle)]
extern "C" fn on_execute(sim: *mut VB, address: u32, _code: *const u16, _length: c_int) -> c_int {
// SAFETY: the *mut VB owns its userdata.
// There is no way for the userdata to be null or otherwise invalid.
@@ -196,14 +196,10 @@ extern "C" fn on_execute(sim: *mut VB, address: u32, _code: *const u16, _length:
stopped = true;
}
if stopped {
1
} else {
0
}
if stopped { 1 } else { 0 }
}
#[no_mangle]
#[unsafe(no_mangle)]
extern "C" fn on_read(
sim: *mut VB,
address: u32,
@@ -229,7 +225,7 @@ extern "C" fn on_read(
0
}
#[no_mangle]
#[unsafe(no_mangle)]
extern "C" fn on_write(
sim: *mut VB,
address: u32,