EightBit/M6502/HarteTest_6502/state_t.cpp
Adrian Conlon b70f24a581 Draw an end to my json experimentations. simdjson is king. long live simdjson!
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-20 21:44:43 +01:00

12 lines
397 B
C++

#include "stdafx.h"
#include "state_t.h"
state_t::state_t(const simdjson::dom::element serialised)
: m_pc((uint16_t)(int64_t)serialised["pc"]),
m_s((uint8_t)(int64_t)serialised["s"]),
m_a((uint8_t)(int64_t)serialised["a"]),
m_x((uint8_t)(int64_t)serialised["x"]),
m_y((uint8_t)(int64_t)serialised["y"]),
m_p((uint8_t)(int64_t)serialised["p"]),
m_ram(serialised["ram"].get_array()) {}