diff options
author | 2016-04-11 12:43:34 +0200 | |
---|---|---|
committer | 2016-04-11 12:43:55 +0200 | |
commit | d981b66bba4d03dd4cee50d72d96b9f9f844390e (patch) | |
tree | acf00077d3d28e96f04f1e528beddc41372a9eb0 /src/devices/cpu/sm510/sm500op.cpp | |
parent | a21453fcde60352616f5bbd170f7293d64d0848a (diff) |
sm500: start on opcodes
Diffstat (limited to 'src/devices/cpu/sm510/sm500op.cpp')
-rw-r--r-- | src/devices/cpu/sm510/sm500op.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/devices/cpu/sm510/sm500op.cpp b/src/devices/cpu/sm510/sm500op.cpp index 15d789f7c35..bb0bc6f043b 100644 --- a/src/devices/cpu/sm510/sm500op.cpp +++ b/src/devices/cpu/sm510/sm500op.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:hap, Igor +// copyright-holders:hap // SM500 opcode handlers @@ -10,6 +10,21 @@ // RAM address instructions +void sm500_device::op_lb() +{ + // LB x: load BM/BL with 4-bit immediate value (partial) + // BL bit 2 is clearned, bit 3 is param bit 2|3 + m_bm = (m_op & 3); + m_bl = ((m_op << 1 | m_op) & 8) | (m_op >> 2 & 3); +} + +void sm500_device::op_incb() +{ + // INCB: increment BL, skip next on overflow, of 3rd bit! + m_bl = (m_bl + 1) & 0xf; + m_skip = (m_bl == 8); +} + // ROM address instructions @@ -78,6 +93,3 @@ void sm500_device::op_comcn() // Test instructions -void sm500_device::op_ta() -{ -} |