mirror of
https://github.com/gopher64/gopher64.git
synced 2026-07-11 01:25:20 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ca2a3d423b | |||
| fe5346235e | |||
| f84444a12e | |||
| 026e4c0e74 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "gopher64"
|
||||
version = "0.1.25"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.82"
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ fn main() {
|
||||
.allowlist_function("rdp_close")
|
||||
.allowlist_function("rdp_set_vi_register")
|
||||
.allowlist_function("rdp_update_screen")
|
||||
.allowlist_function("rdp_full_sync")
|
||||
.allowlist_function("rdp_process_commands")
|
||||
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
|
||||
.generate()
|
||||
|
||||
@@ -62,7 +62,6 @@ static int cmd_cur;
|
||||
static int cmd_ptr;
|
||||
static bool emu_running;
|
||||
static GFX_INFO gfx_info;
|
||||
static uint64_t sync_signal;
|
||||
|
||||
static const unsigned cmd_len_lut[64] = {
|
||||
1,
|
||||
@@ -432,7 +431,7 @@ uint64_t rdp_process_commands()
|
||||
|
||||
if (RDP::Op(command) == RDP::Op::SyncFull)
|
||||
{
|
||||
sync_signal = processor->signal_timeline();
|
||||
processor->wait_for_timeline(processor->signal_timeline());
|
||||
|
||||
uint32_t width = viCalculateHorizonalWidth(*gfx_info.VI_H_START_REG, *gfx_info.VI_X_SCALE_REG, *gfx_info.VI_WIDTH_REG);
|
||||
if (width == 0)
|
||||
@@ -456,8 +455,3 @@ uint64_t rdp_process_commands()
|
||||
|
||||
return interrupt_timer;
|
||||
}
|
||||
|
||||
void rdp_full_sync()
|
||||
{
|
||||
processor->wait_for_timeline(sync_signal);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ extern "C"
|
||||
void rdp_set_vi_register(uint32_t reg, uint32_t value);
|
||||
bool rdp_update_screen();
|
||||
uint64_t rdp_process_commands();
|
||||
void rdp_full_sync();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+1
-2
@@ -54,6 +54,7 @@ pub fn read_regs_dpc(
|
||||
) -> u32 {
|
||||
let reg = (address & 0xFFFF) >> 2;
|
||||
match reg as u32 {
|
||||
DPC_CLOCK_REG => 0xFFFFFF, // needed for JFG
|
||||
DPC_CURRENT_REG => {
|
||||
if device.rdp.wait_frozen {
|
||||
device.rsp.cpu.sync_point = true;
|
||||
@@ -186,7 +187,5 @@ pub fn init(device: &mut device::Device) {
|
||||
fn rdp_interrupt_event(device: &mut device::Device) {
|
||||
device.rdp.regs_dpc[DPC_STATUS_REG as usize] &= !(DPC_STATUS_START_GCLK | DPC_STATUS_PIPE_BUSY);
|
||||
|
||||
ui::video::full_sync();
|
||||
|
||||
device::mi::set_rcp_interrupt(device, device::mi::MI_INTR_DP)
|
||||
}
|
||||
|
||||
@@ -73,10 +73,6 @@ pub fn process_rdp_list() -> u64 {
|
||||
unsafe { rdp_process_commands() }
|
||||
}
|
||||
|
||||
pub fn full_sync() {
|
||||
unsafe { rdp_full_sync() }
|
||||
}
|
||||
|
||||
pub fn draw_text(text: &str, renderer: *mut sdl3_sys::render::SDL_Renderer, font: &rusttype::Font) {
|
||||
let text_size = 32;
|
||||
let scale = rusttype::Scale::uniform(text_size as f32);
|
||||
|
||||
Reference in New Issue
Block a user