mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
SM511: added undocumented opcodes
This commit is contained in:
parent
f29fc8c3db
commit
e28ac68d81
@ -19,7 +19,10 @@
|
||||
- callback for lcd screen as MAME bitmap (when needed)
|
||||
- LCD bs pin blink mode via Y register (0.5s off, 0.5s on)
|
||||
- LB/SBM is correct?
|
||||
- SM511 unknown opcodes
|
||||
- SM511 undocumented/guessed opcodes:
|
||||
* $01 is guessed as DIV to ACC transfer, unknown which bits
|
||||
* $5d is certainly CEND
|
||||
* $65 is certainly IDIV, but not sure if it behaves same as on SM510
|
||||
|
||||
*/
|
||||
|
||||
|
@ -260,6 +260,7 @@ protected:
|
||||
void op_skip();
|
||||
void op_cend();
|
||||
void op_idiv();
|
||||
void op_dta();
|
||||
|
||||
void op_illegal();
|
||||
};
|
||||
|
@ -450,6 +450,12 @@ void sm510_base_device::op_idiv()
|
||||
m_div = 0;
|
||||
}
|
||||
|
||||
void sm510_base_device::op_dta()
|
||||
{
|
||||
// DTA: transfer divider low bits to ACC
|
||||
m_acc = BITSWAP16(m_div,0,0,0,0, 0,0,0,0, 0,0,0,0, 7,8,9,10) & 0xf;
|
||||
}
|
||||
|
||||
void sm510_base_device::op_illegal()
|
||||
{
|
||||
logerror("%s unknown opcode $%02X at $%04X\n", tag(), m_op, m_prev_pc);
|
||||
|
@ -63,8 +63,8 @@ sm512_device::sm512_device(const machine_config &mconfig, const char *tag, devic
|
||||
|
||||
void sm511_device::get_opcode_param()
|
||||
{
|
||||
// XXX?, LBL, PRE, TL, TML and prefix opcodes are 2 bytes
|
||||
if (m_op == 0x01 || (m_op >= 0x5f && m_op <= 0x61) || (m_op & 0xf0) == 0x70 || (m_op & 0xfc) == 0x68)
|
||||
// LBL, PRE, TL, TML and prefix opcodes are 2 bytes
|
||||
if ((m_op >= 0x5f && m_op <= 0x61) || (m_op & 0xf0) == 0x70 || (m_op & 0xfc) == 0x68)
|
||||
{
|
||||
m_icount--;
|
||||
m_param = m_program->read_byte(m_pc);
|
||||
@ -102,7 +102,7 @@ void sm511_device::execute_one()
|
||||
switch (m_op)
|
||||
{
|
||||
case 0x00: op_rot(); break;
|
||||
// case 0x01: op_xxx(); break; // ?
|
||||
case 0x01: op_dta(); break; // guessed
|
||||
case 0x02: op_sbm(); break;
|
||||
case 0x03: op_atpl(); break;
|
||||
case 0x08: op_add(); break;
|
||||
@ -119,7 +119,7 @@ void sm511_device::execute_one()
|
||||
case 0x5a: op_ta0(); break;
|
||||
case 0x5b: op_tabl(); break;
|
||||
case 0x5c: op_atx(); break;
|
||||
// case 0x5d: op_cend(); break;
|
||||
case 0x5d: op_cend(); break;
|
||||
case 0x5e: op_tal(); break;
|
||||
case 0x5f: op_lbl(); break;
|
||||
|
||||
@ -127,7 +127,7 @@ void sm511_device::execute_one()
|
||||
case 0x62: op_wr(); break;
|
||||
case 0x63: op_ws(); break;
|
||||
case 0x64: op_incb(); break;
|
||||
// case 0x65: op_idiv(); break;
|
||||
case 0x65: op_idiv(); break;
|
||||
case 0x66: op_rc(); break;
|
||||
case 0x67: op_sc(); break;
|
||||
case 0x6c: op_decb(); break;
|
||||
|
Loading…
Reference in New Issue
Block a user