Skip to content

Commit 245f8ea

Browse files
committed
position command
1 parent 20db703 commit 245f8ea

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

libmwemu/src/emu/console.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ impl Console {
131131
log::info!("ll ..................... linked list walk");
132132
log::info!("d ...................... dissasemble");
133133
log::info!("dt ..................... dump structure");
134+
log::info!("pos .................... print current position");
134135
log::info!("enter .................. step into");
135136
log::info!("tr ..................... trace reg");
136137
log::info!("trc .................... trace regs clear");

libmwemu/src/emu/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2771,6 +2771,9 @@ impl Emu {
27712771
self.cfg.trace_reg = false;
27722772
self.cfg.reg_names.clear();
27732773
}
2774+
"pos" => {
2775+
log::info!("pos = 0x{:x}", self.pos);
2776+
}
27742777
"c" => {
27752778
self.is_running.store(1, atomic::Ordering::Relaxed);
27762779
return;

libmwemu/src/emu/script.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ impl Script {
377377
emu.cfg.trace_reg = false;
378378
emu.cfg.reg_names.clear();
379379
}
380+
"pos" => {
381+
log::info!("pos = 0x{:x}", emu.pos);
382+
}
380383
"c" => {
381384
emu.is_running
382385
.store(1, std::sync::atomic::Ordering::Relaxed);

scripts/enigma-protector.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/usr/bin/env python3
22

3+
# run python3 installer from python.org
4+
# copy python.exe to python3.exe in C:\Users\Brandon\AppData\Local\Programs\Python\Python313\
5+
# add to GitBash path
36
# python3 -m venv .venv
4-
# source .venv/bin/activate
7+
# source .venv/Scripts/activate
58
# pip install maturin
6-
# maturin develop --release -m pymwemu/Cargo.toml
9+
# maturin build --release -m pymwemu/Cargo.toml
10+
# pip install /c/Users/Brandon/.cargo/.target/wheels/pymwemu-0.9.5-cp313-cp313-win_amd64.whl
11+
# .venv/Scripts/python.exe scripts/enigma-protector.py
712

813
import pymwemu
914
import os

0 commit comments

Comments
 (0)