mirror of
https://github.com/transistorfet/moa.git
synced 2024-09-09 07:55:20 +00:00
Added some fixes
This commit is contained in:
parent
ec74b64984
commit
e0330d41a5
@ -360,11 +360,7 @@ pub fn dump_slice(data: &[u8], mut count: usize) {
|
||||
|
||||
use emulator_hal::bus::{self, BusAccess};
|
||||
|
||||
//impl bus::Error for Error {}
|
||||
|
||||
//impl ErrorType for BusPort {
|
||||
// type Error = Error;
|
||||
//}
|
||||
impl bus::Error for Error {}
|
||||
|
||||
impl BusAccess<u64, Instant> for BusPort {
|
||||
type Error = Error;
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
use femtos::Instant;
|
||||
use emulator_hal::bus::{self, BusAccess, BusError};
|
||||
use emulator_hal::bus::{self, BusAccess, Error as BusError};
|
||||
|
||||
use moa_core::{Error, Address, Addressable};
|
||||
|
||||
|
@ -67,7 +67,7 @@ impl M68kCycle {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn begin<'a>(mut self, cpu: &'a mut M68k) -> M68kCycleExecutor<'a, bus::BusAdapter<M68kAddress, u64, Instant, &'a mut BusPort>> {
|
||||
pub fn begin<'a>(mut self, cpu: &'a mut M68k) -> M68kCycleExecutor<'a, bus::BusAdapter<M68kAddress, u64, Instant, &'a mut BusPort, Error>> {
|
||||
cpu.stats.cycle_number += 1;
|
||||
if cpu.stats.cycle_number > cpu.stats.last_update {
|
||||
cpu.stats.last_update = cpu.stats.last_update + 1_000_000;
|
||||
@ -76,11 +76,11 @@ impl M68kCycle {
|
||||
cpu.stats.last_time = now;
|
||||
}
|
||||
|
||||
let adapter = bus::BusAdapter {
|
||||
bus: &mut cpu.port,
|
||||
translate: translate_address,
|
||||
instant: core::marker::PhantomData,
|
||||
};
|
||||
let adapter = bus::BusAdapter::new(
|
||||
&mut cpu.port,
|
||||
translate_address,
|
||||
|err| err,
|
||||
);
|
||||
|
||||
M68kCycleExecutor {
|
||||
state: &mut cpu.state,
|
||||
@ -162,7 +162,7 @@ impl Transmutable for M68k {
|
||||
}
|
||||
}
|
||||
|
||||
impl<BusError: bus::BusError> From<M68kError<BusError>> for Error {
|
||||
impl<BusError: bus::Error> From<M68kError<BusError>> for Error {
|
||||
fn from(err: M68kError<BusError>) -> Self {
|
||||
match err {
|
||||
M68kError::Halted => Self::Other("cpu halted".to_string()),
|
||||
|
Loading…
Reference in New Issue
Block a user