Compare commits

...

16 Commits

Author SHA1 Message Date
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
Logan McNaughton ca33797973 Update parallel-rdp (#90) 2024-11-10 22:53:53 +01:00
dependabot[bot] 8d331e1aed Update governor requirement from 0.6 to 0.7 (#88)
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.6.0...v0.7.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-10-22 05:07:08 +02:00
Logan McNaughton 5e7f562d0d update eframe to 0.29 (#87) 2024-10-18 21:22:51 +02:00
dependabot[bot] 14e3fe2a55 Update rfd requirement from 0.14 to 0.15 (#86)
Updates the requirements on [rfd](https://github.com/PolyMeilex/rfd) to permit the latest version.
- [Release notes](https://github.com/PolyMeilex/rfd/releases)
- [Changelog](https://github.com/PolyMeilex/rfd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PolyMeilex/rfd/compare/0.14.0...0.15.0)

---
updated-dependencies:
- dependency-name: rfd
  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-10-18 21:14:29 +02:00
Logan McNaughton b1c6dd2910 Add unsafe keyword for extern C (#83) 2024-10-17 20:35:39 +02:00
Logan McNaughton e87c4736ee Update parallel-rdp (#80) 2024-10-07 14:35:12 +02:00
Logan McNaughton e9e1e000c2 Bump to 0.1.10 (#79) 2024-09-02 20:07:27 +02:00
Logan McNaughton bc83dd26ee Update parallel-rdp (#78) 2024-09-02 19:57:47 +02:00
Logan McNaughton ae97990308 Add x86_64 build flag for parallel-rdp (#77)
* Add x86_64 build flag for parallel-rdp

* Fix flag

* Update build.rs
2024-08-28 12:35:52 +02:00
Logan McNaughton e02ac09703 Fix build target for optimizations (#76) 2024-08-25 23:01:52 +02:00
Logan McNaughton 4cbdae2fce Bump version to 0.1.9 (#75) 2024-08-25 17:58:42 +02:00
8 changed files with 27 additions and 16 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
[build]
[target.'cfg(target_arch = "x86_64")']
rustflags = ["-C", "target-cpu=x86-64-v3"]
+4 -4
View File
@@ -1,6 +1,6 @@
[package]
name = "gopher64"
version = "0.1.8"
version = "0.1.11"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -8,13 +8,13 @@ edition = "2021"
[dependencies]
dirs = "5.0"
zip = "2.1"
governor = "0.6"
governor = "0.8"
sevenz-rust = "0.6"
chrono = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
eframe = "0.28"
rfd = "0.14"
eframe = "0.30"
rfd = "0.15"
sha2 = "0.10"
rusttype = "0.9"
futures = "0.3"
+8
View File
@@ -51,6 +51,10 @@ fn main() {
#[cfg(target_os = "windows")]
{
#[cfg(target_arch = "x86_64")]
{
build.flag("/arch:AVX2");
}
build.flag("-DVK_USE_PLATFORM_WIN32_KHR");
winres::WindowsResource::new()
@@ -60,6 +64,10 @@ fn main() {
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
{
#[cfg(target_arch = "x86_64")]
{
build.flag("-march=x86-64-v3");
}
build
.flag("-Wno-missing-field-initializers")
.flag("-Wno-unused-parameter");
+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;
+2 -2
View File
@@ -179,7 +179,7 @@ impl eframe::App for GopherEguiApp {
for i in 0..4 {
ui.label(format!("{}", i + 1));
egui::ComboBox::from_id_source(format!("profile-combo-{}", i))
egui::ComboBox::from_id_salt(format!("profile-combo-{}", i))
.selected_text(self.selected_profile[i].clone())
.show_ui(ui, |ui| {
for j in 0..self.input_profiles.len() {
@@ -196,7 +196,7 @@ impl eframe::App for GopherEguiApp {
} else {
self.controllers[self.selected_controller[i] as usize].clone()
};
egui::ComboBox::from_id_source(format!("controller-combo-{}", i))
egui::ComboBox::from_id_salt(format!("controller-combo-{}", i))
.selected_text(controller_text)
.show_ui(ui, |ui| {
ui.selectable_value(
+1 -1
View File
@@ -1,6 +1,6 @@
use crate::ui;
extern "C" {
unsafe extern "C" {
pub fn vk_init(rdram_ptr: usize, rdram_size: u32, fullscreen: u8);
pub fn set_sdl_window(window: usize);
pub fn rdp_update_screen() -> u8;