Compare commits

..

7 Commits

Author SHA1 Message Date
Logan McNaughton 5409b0f5d4 use spin sleep for more accurate VI timing (#97) 2024-12-29 12:06:59 +01:00
Logan McNaughton f9de4110ce Bump to 0.1.12 (#96) 2024-12-23 12:09:18 +01:00
Logan McNaughton 0eadc38917 fix out-of-bound access in sram (#95) 2024-12-23 11:20:09 +01:00
Logan McNaughton a40e795036 deal with out-of-bounds reads for RDRAM->RSP DMA (#94) 2024-12-23 10:15:30 +01:00
dependabot[bot] b70c943a43 Update eframe requirement from 0.29 to 0.30 (#93)
Updates the requirements on [eframe](https://github.com/emilk/egui) to permit the latest version.
- [Release notes](https://github.com/emilk/egui/releases)
- [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emilk/egui/compare/0.29.0...0.30.0)

---
updated-dependencies:
- dependency-name: eframe
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-17 06:52:15 +01:00
dependabot[bot] c962589478 Update governor requirement from 0.7 to 0.8 (#92)
Updates the requirements on [governor](https://github.com/boinkor-net/governor) to permit the latest version.
- [Release notes](https://github.com/boinkor-net/governor/releases)
- [Changelog](https://github.com/boinkor-net/governor/blob/master/release.toml)
- [Commits](https://github.com/boinkor-net/governor/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: governor
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 06:46:17 +01:00
Logan McNaughton 6dec154351 Bump to 0.1.11 (#91) 2024-11-10 23:01:50 +01:00
4 changed files with 15 additions and 11 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "gopher64"
version = "0.1.10"
version = "0.1.12"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -8,17 +8,18 @@ edition = "2021"
[dependencies]
dirs = "5.0"
zip = "2.1"
governor = "0.7"
governor = "0.8"
sevenz-rust = "0.6"
chrono = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
eframe = "0.29"
eframe = "0.30"
rfd = "0.15"
sha2 = "0.10"
rusttype = "0.9"
futures = "0.3"
sdl2-sys = "0.37"
spin_sleep = "1.3"
clap = { version = "4.4", features = ["derive"] }
[dependencies.sdl2]
+8 -5
View File
@@ -165,11 +165,14 @@ pub fn do_dma(device: &mut device::Device, dma: RspDma) {
while j < count {
let mut i = 0;
while i < length {
let data = u32::from_ne_bytes(
device.rdram.mem[dram_addr as usize..dram_addr as usize + 4]
.try_into()
.unwrap(),
);
let mut data = 0;
if dram_addr < device::rdram::RDRAM_SIZE as u32 {
data = u32::from_ne_bytes(
device.rdram.mem[dram_addr as usize..dram_addr as usize + 4]
.try_into()
.unwrap(),
);
}
if offset != 0 {
// imem being updated
device.rsp.cpu.instructions[((mem_addr & 0xFFF) / 4) as usize].func =
+2 -2
View File
@@ -141,7 +141,7 @@ pub fn dma_read_sram(
format_sram(device);
while i < dram_addr + length {
while i < dram_addr + length && i < device::rdram::RDRAM_SIZE as u32 {
device.ui.saves.sram.0[j as usize] = device.rdram.mem[i as usize ^ device.byte_swap];
i += 1;
j += 1;
@@ -191,7 +191,7 @@ pub fn dma_write_sram(
format_sram(device);
while i < dram_addr + length {
while i < dram_addr + length && i < device::rdram::RDRAM_SIZE as u32 {
device.rdram.mem[i as usize ^ device.byte_swap] = device.ui.saves.sram.0[j as usize];
i += 1;
j += 1;
+1 -1
View File
@@ -163,7 +163,7 @@ pub fn speed_limiter(device: &device::Device) {
if result.is_err() {
let outcome = result.unwrap_err();
let dur = outcome.wait_time_from(governor::clock::DefaultClock::default().now());
std::thread::sleep(dur);
spin_sleep::sleep(dur);
device.vi.limiter.as_ref().unwrap().check().unwrap();
}