remove rdp_full_sync (#203)

* remove rdp_full_sync

* swap

* swap
This commit is contained in:
Logan McNaughton 2025-01-30 14:42:04 +01:00 committed by GitHub
parent 026e4c0e74
commit f84444a12e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 15 deletions

View File

@ -42,6 +42,11 @@ jobs:
version: ${{ matrix.target }}-1.0
- name: Build
run: |
sudo fallocate -l 4G /swapfile2
sudo chmod 600 /swapfile2
sudo mkswap /swapfile2
sudo swapon /swapfile2
free -h
cargo build --release -v --target=${{ matrix.target }}
- name: Upload file
uses: actions/upload-artifact@v4

View File

@ -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()

View File

@ -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);
}

View File

@ -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
}

View File

@ -186,7 +186,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)
}

View File

@ -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);