summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt6
-rw-r--r--Cargo.toml2
-rw-r--r--README.txt4
-rw-r--r--src/luma.rs2
-rw-r--r--src/luma/device/continue.rs4
-rw-r--r--src/luma/device/decode_thumb.rs6
-rw-r--r--src/luma/device/push.rs2
-rw-r--r--src/luma/device/store.rs2
8 files changed, 17 insertions, 11 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 907820d..66f1bd1 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,9 @@
+# 0.2B
+
+* Update messages
+* Fix lsr and lsl
+* Fix str
+
# 0.2A
* Implement Thumb:
diff --git a/Cargo.toml b/Cargo.toml
index 1587560..53447d4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "luma"
-version = "0.42.0"
+version = "0.43.0"
authors = ["Gabriel Jensen"]
edition = "2021"
description = "AGB emulator."
diff --git a/README.txt b/README.txt
index 33d1c53..941d32b 100644
--- a/README.txt
+++ b/README.txt
@@ -65,8 +65,8 @@ Moreover, the following Thumb instructions are supported:
* ldr Rd, [Rn, Rm]
* ldr Rd, [r13, Immediate8]
* ldr Rd, [r15, Immediate8]
- * lsl Rd, Rm, Immediate5
- * lsr Rd, Rm, Immediate5
+ * lsls Rd, Rm, Immediate5
+ * lsrs Rd, Rm, Immediate5
* mov Rd, Rn
* movs Rd, Immediate8
* movs Rd, Rn
diff --git a/src/luma.rs b/src/luma.rs
index 6830045..000cb45 100644
--- a/src/luma.rs
+++ b/src/luma.rs
@@ -32,7 +32,7 @@ pub struct VersionType<T> {
pub const VERSION: VersionType::<u32> = VersionType::<u32> {
major: 0x0,
- minor: 0x2A,
+ minor: 0x2B,
};
pub struct WidthHeight<T> {
diff --git a/src/luma/device/continue.rs b/src/luma/device/continue.rs
index 519cf81..9fe39b2 100644
--- a/src/luma/device/continue.rs
+++ b/src/luma/device/continue.rs
@@ -30,7 +30,7 @@ impl Device {
(self.registers[0xF], _) = self.registers[0xF].overflowing_add(0x4);
- self.log(Log::Continue, format!("pc => pc+4={:#010X}", self.registers[0xF]));
+ self.log(Log::Continue, format!("pc => pc+4 ({:#010X})", self.registers[0xF]));
}
pub fn thumb_continue(&mut self) {
@@ -39,6 +39,6 @@ impl Device {
(self.registers[0xF], _) = self.registers[0xF].overflowing_add(0x2);
- self.log(Log::Continue, format!("pc => pc+2={:#010X}", self.registers[0xF]));
+ self.log(Log::Continue, format!("pc => pc+2 ({:#010X})", self.registers[0xF]));
}
}
diff --git a/src/luma/device/decode_thumb.rs b/src/luma/device/decode_thumb.rs
index deafdfa..c6becb6 100644
--- a/src/luma/device/decode_thumb.rs
+++ b/src/luma/device/decode_thumb.rs
@@ -136,7 +136,7 @@ impl Device {
let source = ((opcode & 0b0000000000111000) >> 0x3) as u8;
- let immediate = ((opcode & 0b0000011111000000) >> 0x5) as u8;
+ let immediate = ((opcode & 0b0000011111000000) >> 0x6) as u8;
self.thumb_shift_left(destination, source, immediate);
return self.thumb_continue();
@@ -148,7 +148,7 @@ impl Device {
let source = ((opcode & 0b0000000000111000) >> 0x3) as u8;
- let immediate = ((opcode & 0b0000011111000000) >> 0x5) as u8;
+ let immediate = ((opcode & 0b0000011111000000) >> 0x6) as u8;
self.thumb_shift_right(destination, source, immediate);
return self.thumb_continue();
@@ -208,7 +208,7 @@ impl Device {
if opcode & 0b1111100000000000 == 0b1000000000000000 {
let source = (opcode & 0b0000000000000111) as u8;
- let base = ((opcode & 0b0000000000000111) >> 0x3) as u8;
+ let base = ((opcode & 0b0000000000111000) >> 0x3) as u8;
let immediate = ((opcode & 0b0000011111000000) >> 0x6) as u8;
diff --git a/src/luma/device/push.rs b/src/luma/device/push.rs
index 65ca3d9..1c33302 100644
--- a/src/luma/device/push.rs
+++ b/src/luma/device/push.rs
@@ -48,7 +48,7 @@ impl Device {
let value = self.registers[0xD];
self.write_word(address, value);
- self.log(Log::Push, format!("{address:#010X} = lr ({value:#010X})"));
+ self.log(Log::Push, format!("{address:#010X} => lr ({value:#010X})"));
}
self.registers[0xE] = start;
diff --git a/src/luma/device/store.rs b/src/luma/device/store.rs
index 981b502..14bc154 100644
--- a/src/luma/device/store.rs
+++ b/src/luma/device/store.rs
@@ -68,7 +68,7 @@ impl Device {
let value = (self.registers[source as usize] & 0b00000000000000001111111111111111) as u16;
self.write_halfword(address, value);
- self.log(Log::Store, format!("r{source} => r{base}{immediate:+} ({value:#06X})"));
+ self.log(Log::Store, format!("r{source} => r{base}{immediate:+}={address:#010X} ({value:#06X})"));
}
}