2017-01-18 16:18:19 +00:00
|
|
|
#include <atf-c.h>
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2017-01-19 10:49:05 +00:00
|
|
|
#include <stdbool.h>
|
2017-01-18 16:18:19 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "bus.h"
|
|
|
|
#include "rk65c02.h"
|
2017-01-26 12:11:37 +00:00
|
|
|
#include "utils.h"
|
2017-01-19 10:49:05 +00:00
|
|
|
|
2017-01-25 09:10:00 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_bit);
|
|
|
|
ATF_TC_BODY(emul_bit, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* BIT immediate */
|
|
|
|
e.regs.A = 0x40;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_bit_imm.rom", tc));
|
2017-01-25 09:10:00 +00:00
|
|
|
ATF_CHECK(!(e.regs.P & P_ZERO));
|
|
|
|
ATF_CHECK(e.regs.P & P_SIGN_OVERFLOW);
|
|
|
|
ATF_CHECK(!(e.regs.P & P_NEGATIVE));
|
|
|
|
/* BIT zero page */
|
|
|
|
e.regs.A = 0x40;
|
|
|
|
bus_write_1(&b, 0x10, 0x80);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_bit_zp.rom", tc));
|
2017-01-25 09:10:00 +00:00
|
|
|
ATF_CHECK(e.regs.P & P_ZERO);
|
|
|
|
ATF_CHECK(!(e.regs.P & P_SIGN_OVERFLOW));
|
|
|
|
ATF_CHECK(e.regs.P & P_NEGATIVE);
|
|
|
|
/* BIT zero page X */
|
|
|
|
e.regs.A = 0x40;
|
|
|
|
e.regs.X = 0x1;
|
|
|
|
bus_write_1(&b, 0x10, 0x40);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_bit_zpx.rom", tc));
|
2017-01-25 09:10:00 +00:00
|
|
|
ATF_CHECK(!(e.regs.P & P_ZERO));
|
|
|
|
ATF_CHECK(e.regs.P & P_SIGN_OVERFLOW);
|
|
|
|
ATF_CHECK(!(e.regs.P & P_NEGATIVE));
|
|
|
|
/* BIT absolute */
|
|
|
|
e.regs.A = 0x80;
|
|
|
|
bus_write_1(&b, 0x2010, 0x80);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_bit_abs.rom", tc));
|
2017-01-25 09:10:00 +00:00
|
|
|
ATF_CHECK(!(e.regs.P & P_ZERO));
|
|
|
|
ATF_CHECK(!(e.regs.P & P_SIGN_OVERFLOW));
|
|
|
|
ATF_CHECK(e.regs.P & P_NEGATIVE);
|
|
|
|
/* BIT absolute X */
|
|
|
|
e.regs.A = 0x40;
|
|
|
|
e.regs.X = 0x2;
|
|
|
|
bus_write_1(&b, 0x2010, 0x80);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_bit_absx.rom", tc));
|
2017-01-25 09:10:00 +00:00
|
|
|
ATF_CHECK(e.regs.P & P_ZERO);
|
|
|
|
ATF_CHECK(!(e.regs.P & P_SIGN_OVERFLOW));
|
|
|
|
ATF_CHECK(e.regs.P & P_NEGATIVE);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-22 21:35:50 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_dex_dey);
|
|
|
|
ATF_TC_BODY(emul_dex_dey, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* DEX */
|
|
|
|
e.regs.X = 0x1;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dex.rom", tc));
|
2017-01-22 21:35:50 +00:00
|
|
|
ATF_CHECK(e.regs.X == 0x0);
|
|
|
|
/* DEX underflow */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dex.rom", tc));
|
2017-01-22 21:35:50 +00:00
|
|
|
ATF_CHECK(e.regs.X == 0xFF);
|
|
|
|
|
|
|
|
/* DEY */
|
|
|
|
e.regs.Y = 0x1;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dey.rom", tc));
|
2017-01-22 21:35:50 +00:00
|
|
|
ATF_CHECK(e.regs.Y == 0x0);
|
|
|
|
/* DEY underflow */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dey.rom", tc));
|
2017-01-22 21:35:50 +00:00
|
|
|
ATF_CHECK(e.regs.Y == 0xFF);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_dec);
|
|
|
|
ATF_TC_BODY(emul_dec, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* DEC A */
|
|
|
|
e.regs.A = 0x1;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_a.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0x0);
|
|
|
|
/* DEC A underflow */
|
|
|
|
e.regs.A = 0x0;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_a.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
|
|
|
|
/* DEC zero page */
|
|
|
|
bus_write_1(&b, 0x10, 0x01);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_zp.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x10) == 0x0);
|
|
|
|
/* DEC zero page underflow */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_zp.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x10) == 0xFF);
|
|
|
|
|
|
|
|
/* DEC zero page X */
|
|
|
|
e.regs.X = 1;
|
|
|
|
bus_write_1(&b, 0x11, 0x01);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_zpx.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x11) == 0x0);
|
|
|
|
/* DEC zero page X overflow */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_zpx.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x11) == 0xFF);
|
|
|
|
|
|
|
|
/* DEC absolute */
|
|
|
|
bus_write_1(&b, 0x2010, 0xA1);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_abs.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0xA0);
|
|
|
|
/* DEC absolute overflow */
|
|
|
|
bus_write_1(&b, 0x2010, 0x0);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_abs.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0xFF);
|
|
|
|
|
|
|
|
/* DEC absolute X */
|
|
|
|
e.regs.X = 0x10;
|
|
|
|
bus_write_1(&b, 0x2020, 0x1);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_absx.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2020) == 0x0);
|
|
|
|
/* DEC absolute X underflow */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_dec_absx.rom", tc));
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2020) == 0xFF);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_inc);
|
|
|
|
ATF_TC_BODY(emul_inc, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* INC A */
|
|
|
|
e.regs.A = 0x1;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_a.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0x2);
|
|
|
|
/* rk65c02_dump_regs(&e);*/
|
|
|
|
/* INC A overflow */
|
|
|
|
e.regs.A = 0xFF;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_a.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0x0);
|
|
|
|
|
|
|
|
/* INC zero page */
|
|
|
|
bus_write_1(&b, 0x10, 0x00);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_zp.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x10) == 0x1);
|
|
|
|
/* INC zero page overflow */
|
|
|
|
bus_write_1(&b, 0x10, 0xFF);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_zp.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x10) == 0x00);
|
|
|
|
|
|
|
|
/* INC zero page X */
|
|
|
|
e.regs.X = 1;
|
|
|
|
bus_write_1(&b, 0x11, 0x00);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_zpx.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x11) == 0x1);
|
|
|
|
/* INC zero page X overflow */
|
|
|
|
bus_write_1(&b, 0x11, 0xFF);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_zpx.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x11) == 0x00);
|
|
|
|
|
|
|
|
/* INC absolute */
|
|
|
|
bus_write_1(&b, 0x2010, 0xA0);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_abs.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0xA1);
|
|
|
|
/* INC absolute overflow */
|
|
|
|
bus_write_1(&b, 0x2010, 0xFF);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_abs.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0x00);
|
|
|
|
|
|
|
|
/* INC absolute X */
|
|
|
|
e.regs.X = 0x10;
|
|
|
|
bus_write_1(&b, 0x2020, 0xFE);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_absx.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2020) == 0xFF);
|
|
|
|
/* INC absolute X overflow */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inc_absx.rom", tc));
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2020) == 0x00);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-22 12:07:21 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_inx_iny);
|
|
|
|
ATF_TC_BODY(emul_inx_iny, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* INX */
|
|
|
|
e.regs.X = 0;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inx.rom", tc));
|
2017-01-22 12:07:21 +00:00
|
|
|
ATF_CHECK(e.regs.X == 0x1);
|
|
|
|
/* INX overflow */
|
|
|
|
e.regs.X = 0xFF;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_inx.rom", tc));
|
2017-01-22 12:07:21 +00:00
|
|
|
ATF_CHECK(e.regs.X == 0x0);
|
|
|
|
|
|
|
|
/* INY */
|
|
|
|
e.regs.Y = 0;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_iny.rom", tc));
|
2017-01-22 12:07:21 +00:00
|
|
|
ATF_CHECK(e.regs.Y == 0x1);
|
|
|
|
/* INY overflow */
|
|
|
|
e.regs.Y = 0xFF;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_iny.rom", tc));
|
2017-01-22 12:07:21 +00:00
|
|
|
ATF_CHECK(e.regs.Y == 0x0);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-18 21:37:00 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_lda);
|
|
|
|
ATF_TC_BODY(emul_lda, tc)
|
2017-01-18 16:18:19 +00:00
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
2017-01-19 10:49:05 +00:00
|
|
|
/* LDA immediate */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_imm.rom", tc));
|
2017-01-19 10:49:05 +00:00
|
|
|
/* ATF_CHECK(e.state == STOPPED); // separate test case for states? */
|
|
|
|
ATF_CHECK(e.regs.PC == ROM_LOAD_ADDR+3); // separate test case for PC? */
|
2017-01-18 21:37:00 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xAF);
|
|
|
|
|
2017-01-19 10:49:05 +00:00
|
|
|
/* LDA zero page */
|
|
|
|
bus_write_1(&b, 0x10, 0xAE);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_zp.rom", tc));
|
2017-01-19 10:49:05 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xAE);
|
|
|
|
|
2017-01-23 09:28:44 +00:00
|
|
|
/* LDA absolute */
|
|
|
|
bus_write_1(&b, 0x2F5A, 0xEA);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_abs.rom", tc));
|
2017-01-23 09:28:44 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xEA);
|
|
|
|
|
2017-01-23 15:33:03 +00:00
|
|
|
/* LDA absolute X */
|
|
|
|
bus_write_1(&b, 0x2F5A, 0xEB);
|
|
|
|
e.regs.X = 0x5A;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_absx.rom", tc));
|
2017-01-23 15:33:03 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xEB);
|
|
|
|
|
|
|
|
/* LDA absolute X */
|
|
|
|
bus_write_1(&b, 0x2F5E, 0xEC);
|
|
|
|
e.regs.Y = 0x5E;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_absy.rom", tc));
|
2017-01-23 15:33:03 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xEC);
|
|
|
|
|
2017-01-18 21:37:00 +00:00
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-21 20:46:35 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_stz);
|
|
|
|
ATF_TC_BODY(emul_stz, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* STZ zp */
|
|
|
|
bus_write_1(&b, 0x10, 0xAA);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_stz_zp.rom", tc));
|
2017-01-21 20:46:35 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x10) == 0x00);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-28 10:12:25 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_clv);
|
|
|
|
ATF_TC_BODY(emul_clv, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
e.regs.P |= P_SIGN_OVERFLOW;
|
|
|
|
/* CLV */
|
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_clv.rom", tc));
|
|
|
|
ATF_CHECK(e.regs.P ^ P_SIGN_OVERFLOW);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-22 12:50:04 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_clc_sec);
|
|
|
|
ATF_TC_BODY(emul_clc_sec, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* SEC */
|
|
|
|
e.regs.P &= ~P_CARRY;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sec.rom", tc));
|
2017-01-22 12:50:04 +00:00
|
|
|
ATF_CHECK(e.regs.P & P_CARRY);
|
|
|
|
/* CLC */
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_clc.rom", tc));
|
2017-01-22 12:50:04 +00:00
|
|
|
ATF_CHECK(e.regs.P ^ P_CARRY);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-20 09:41:56 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_and);
|
|
|
|
ATF_TC_BODY(emul_and, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* AND immediate */
|
|
|
|
e.regs.A = 0xFF;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_and_imm.rom", tc));
|
2017-01-20 09:41:56 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xAA);
|
|
|
|
|
|
|
|
/* AND zero page */
|
|
|
|
/* bus_write_1(&b, 0x10, 0xAE);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_and_zp.rom", tc));
|
2017-01-20 09:41:56 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xAE);*/
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-18 21:37:00 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_nop);
|
|
|
|
ATF_TC_BODY(emul_nop, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
2017-01-18 23:57:09 +00:00
|
|
|
e.regs.PC = ROM_LOAD_ADDR;
|
2017-01-18 21:37:00 +00:00
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_nop.rom", tc));
|
2017-01-18 21:37:00 +00:00
|
|
|
|
2017-01-20 22:18:25 +00:00
|
|
|
ATF_CHECK(e.regs.PC == ROM_LOAD_ADDR+2);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_sta);
|
|
|
|
ATF_TC_BODY(emul_sta, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* STA zero page */
|
|
|
|
e.regs.A = 0xAA;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_zp.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x20) == 0xAA);
|
|
|
|
/* STA zero page X */
|
|
|
|
e.regs.A = 0x55;
|
|
|
|
e.regs.X = 0x1;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_zpx.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x20) == 0x55);
|
|
|
|
/* STA absolute */
|
|
|
|
e.regs.A = 0xAA;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_abs.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0xAA);
|
|
|
|
/* STA absolute X */
|
|
|
|
e.regs.A = 0x55;
|
|
|
|
e.regs.X = 0x10;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_absx.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0x55);
|
|
|
|
/* STA absolute Y */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
e.regs.X = 0;
|
|
|
|
e.regs.Y = 0x1;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_absy.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0xAA);
|
|
|
|
/* STA indirect zero */
|
|
|
|
e.regs.A = 0x55;
|
|
|
|
bus_write_1(&b, 0x25, 0x10);
|
|
|
|
bus_write_1(&b, 0x26, 0x20);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_izp.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0x55);
|
|
|
|
/* STA indirect zero page X */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
e.regs.X = 0x4;
|
|
|
|
e.regs.Y = 0;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_izpx.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0xAA);
|
|
|
|
/* STA indirect zero page Y */
|
|
|
|
e.regs.A = 0x54;
|
|
|
|
e.regs.X = 0;
|
|
|
|
e.regs.Y = 0x1;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_sta_izpy.rom", tc));
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_CHECK(bus_read_1(&b, 0x2010) == 0x55);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_ora);
|
|
|
|
ATF_TC_BODY(emul_ora, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
/* ORA immediate */
|
|
|
|
e.regs.A = 0x55;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_imm.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA zero page */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
bus_write_1(&b, 0x10, 0x55);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_zp.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA zero page X */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
e.regs.X = 0x11;
|
|
|
|
bus_write_1(&b, 0x21, 0x55);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_zpx.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA absolute */
|
|
|
|
e.regs.A = 0x55;
|
|
|
|
bus_write_1(&b, 0x2A01, 0xAA);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_abs.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA absolute X */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
e.regs.X = 0x1;
|
|
|
|
bus_write_1(&b, 0x2A01, 0x55);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_absx.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA absolute Y */
|
|
|
|
e.regs.A = 0x55;
|
|
|
|
e.regs.X = 0;
|
|
|
|
e.regs.Y = 0x2;
|
|
|
|
bus_write_1(&b, 0x2A02, 0xAA);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_absy.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA indirect zero */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
bus_write_1(&b, 0x2A04, 0x55);
|
|
|
|
bus_write_1(&b, 0x12, 0x04);
|
|
|
|
bus_write_1(&b, 0x13, 0x2A);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_izp.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA indirect zero page X */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
e.regs.X = 0x2;
|
|
|
|
e.regs.Y = 0;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_izpx.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
/* ORA indirect zero page Y */
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
e.regs.X = 0;
|
|
|
|
e.regs.Y = 0x1;
|
|
|
|
bus_write_1(&b, 0x2A04, 0x54);
|
|
|
|
bus_write_1(&b, 0x14, 0x04);
|
|
|
|
bus_write_1(&b, 0x15, 0x2A);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ora_izpy.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-24 11:55:46 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_txa_tya_tax_tay);
|
|
|
|
ATF_TC_BODY(emul_txa_tya_tax_tay, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
e.regs.A = 0x0;
|
|
|
|
e.regs.X = 0xAA;
|
|
|
|
e.regs.Y = 0x55;
|
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_txa.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xAA);
|
2017-01-24 11:55:46 +00:00
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_tya.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0x55);
|
2017-01-24 11:55:46 +00:00
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_tax.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.X == 0x55);
|
2017-01-24 11:55:46 +00:00
|
|
|
|
|
|
|
e.regs.A = 0xFF;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_tay.rom", tc));
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_CHECK(e.regs.A == 0xFF);
|
2017-01-24 11:55:46 +00:00
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-20 22:18:25 +00:00
|
|
|
/* test stack operation and stack related opcodes - PLA, PHA... */
|
|
|
|
ATF_TC_WITHOUT_HEAD(emul_stack);
|
|
|
|
ATF_TC_BODY(emul_stack, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* place 0xAA on stack */
|
|
|
|
e.regs.SP = 0xFF;
|
|
|
|
e.regs.A = 0xAA;
|
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_pha.rom", tc));
|
2017-01-20 22:18:25 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFE);
|
|
|
|
ATF_CHECK(bus_read_1(e.bus, STACK_END) == 0xAA);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Run again to see if stack pointer further decrements and we'll
|
|
|
|
* end up with one more value on stack.
|
|
|
|
*/
|
|
|
|
e.regs.PC = ROM_LOAD_ADDR;
|
|
|
|
e.regs.A = 0xAB;
|
|
|
|
|
2017-01-18 21:37:00 +00:00
|
|
|
rk65c02_start(&e);
|
|
|
|
|
2017-01-20 22:18:25 +00:00
|
|
|
ATF_CHECK(e.regs.SP == 0xFD);
|
|
|
|
ATF_CHECK(bus_read_1(e.bus, STACK_END) == 0xAA);
|
|
|
|
ATF_CHECK(bus_read_1(e.bus, STACK_END-1) == 0xAB);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Now let's see if loading back into accumulator works.
|
|
|
|
*/
|
|
|
|
e.regs.A = 0x0;
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_pla.rom", tc));
|
2017-01-20 22:18:25 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFE);
|
|
|
|
ATF_CHECK(e.regs.A == 0xAB);
|
2017-01-18 16:18:19 +00:00
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-22 22:01:24 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_php_plp);
|
|
|
|
ATF_TC_BODY(emul_php_plp, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
e.regs.SP = 0xFF;
|
|
|
|
e.regs.P |= P_CARRY|P_ZERO|P_UNDEFINED;
|
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_php.rom", tc));
|
2017-01-22 22:01:24 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFE);
|
2017-01-27 11:31:20 +00:00
|
|
|
ATF_CHECK(bus_read_1(e.bus, STACK_END) == (P_IRQ_DISABLE|P_CARRY|P_ZERO|P_UNDEFINED));
|
2017-01-22 22:01:24 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Now let's see if loading back into accumulator works.
|
|
|
|
*/
|
|
|
|
bus_write_1(e.bus, STACK_END, P_CARRY|P_DECIMAL);
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_plp.rom", tc));
|
2017-01-22 22:01:24 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFF);
|
|
|
|
ATF_CHECK(e.regs.P == (P_CARRY|P_DECIMAL|P_UNDEFINED));
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-25 12:14:00 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_phx_phy_plx_ply);
|
|
|
|
ATF_TC_BODY(emul_phx_phy_plx_ply, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
|
|
|
/* check push X to stack */
|
|
|
|
e.regs.X = 0xAA;
|
|
|
|
e.regs.SP = 0xFF;
|
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_phx.rom", tc));
|
2017-01-25 12:14:00 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFE);
|
|
|
|
ATF_CHECK(bus_read_1(e.bus, STACK_END) == 0xAA);
|
|
|
|
|
|
|
|
/* check pull X from stack */
|
|
|
|
e.regs.X = 0;
|
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_plx.rom", tc));
|
2017-01-25 12:14:00 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFF);
|
|
|
|
ATF_CHECK(e.regs.X == 0xAA);
|
|
|
|
|
|
|
|
/* check push Y to stack */
|
|
|
|
e.regs.Y = 0x55;
|
|
|
|
e.regs.SP = 0xFF;
|
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_phy.rom", tc));
|
2017-01-25 12:14:00 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFE);
|
|
|
|
ATF_CHECK(bus_read_1(e.bus, STACK_END) == 0x55);
|
|
|
|
|
|
|
|
/* check pull X from stack */
|
|
|
|
e.regs.Y = 0xFF;
|
|
|
|
|
2017-01-27 11:12:00 +00:00
|
|
|
ATF_REQUIRE(rom_start(&e, "test_emulation_ply.rom", tc));
|
2017-01-25 12:14:00 +00:00
|
|
|
|
|
|
|
ATF_CHECK(e.regs.SP == 0xFF);
|
|
|
|
ATF_CHECK(e.regs.Y == 0x55);
|
|
|
|
|
|
|
|
bus_finish(&b);
|
|
|
|
}
|
|
|
|
|
2017-01-27 21:28:33 +00:00
|
|
|
ATF_TC_WITHOUT_HEAD(emul_jmp);
|
|
|
|
ATF_TC_BODY(emul_jmp, tc)
|
|
|
|
{
|
|
|
|
rk65c02emu_t e;
|
|
|
|
bus_t b;
|
|
|
|
|
|
|
|
b = bus_init();
|
|
|
|
e = rk65c02_init(&b);
|
|
|
|
|
2017-01-27 23:11:16 +00:00
|
|
|
/* JMP absolute */
|
2017-01-27 21:28:33 +00:00
|
|
|
e.regs.PC = ROM_LOAD_ADDR;
|
|
|
|
ATF_REQUIRE(bus_load_file(&b, ROM_LOAD_ADDR,
|
|
|
|
rom_path("test_emulation_jmp_abs.rom", tc)));
|
|
|
|
|
|
|
|
rk65c02_step(&e, 3);
|
2017-01-27 23:11:16 +00:00
|
|
|
ATF_CHECK(e.regs.PC = 0xC000);
|
2017-01-27 21:28:33 +00:00
|
|
|
|
2017-01-27 23:11:16 +00:00
|
|
|
/* JMP indirect absolute */
|
|
|
|
e.regs.PC = ROM_LOAD_ADDR;
|
|
|
|
ATF_REQUIRE(bus_load_file(&b, ROM_LOAD_ADDR,
|
|
|
|
rom_path("test_emulation_jmp_iabs.rom", tc)));
|
2017-01-27 21:28:33 +00:00
|
|
|
|
2017-01-27 23:11:16 +00:00
|
|
|
bus_write_1(&b, 0x20, 0x0);
|
|
|
|
bus_write_1(&b, 0x21, 0xC0);
|
|
|
|
|
|
|
|
rk65c02_step(&e, 3);
|
|
|
|
ATF_CHECK(e.regs.PC = 0xC000);
|
|
|
|
|
|
|
|
/* JMP indirect absolute X */
|
|
|
|
e.regs.PC = ROM_LOAD_ADDR;
|
|
|
|
ATF_REQUIRE(bus_load_file(&b, ROM_LOAD_ADDR,
|
|
|
|
rom_path("test_emulation_jmp_iabsx.rom", tc)));
|
|
|
|
|
|
|
|
e.regs.X = 0x10;
|
|
|
|
bus_write_1(&b, 0x40, 0x0);
|
|
|
|
bus_write_1(&b, 0x41, 0xC0);
|
|
|
|
|
|
|
|
rk65c02_step(&e, 3);
|
|
|
|
ATF_CHECK(e.regs.PC = 0xC000);
|
2017-01-27 21:28:33 +00:00
|
|
|
}
|
|
|
|
|
2017-01-18 16:18:19 +00:00
|
|
|
ATF_TP_ADD_TCS(tp)
|
|
|
|
{
|
2017-01-20 09:41:56 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_and);
|
2017-01-25 09:10:00 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_bit);
|
2017-01-27 10:43:15 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_dec);
|
2017-01-22 21:35:50 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_dex_dey);
|
2017-01-22 12:50:04 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_clc_sec);
|
2017-01-28 10:12:25 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_clv);
|
2017-01-27 10:29:17 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_inc);
|
2017-01-22 12:07:21 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_inx_iny);
|
2017-01-27 21:28:33 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_jmp);
|
2017-01-18 21:37:00 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_lda);
|
|
|
|
ATF_TP_ADD_TC(tp, emul_nop);
|
2017-01-24 15:37:55 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_ora);
|
2017-01-21 20:46:35 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_stz);
|
2017-01-22 22:01:24 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_php_plp);
|
2017-01-25 12:14:00 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_phx_phy_plx_ply);
|
2017-01-20 22:18:25 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_stack);
|
2017-01-24 11:55:46 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_txa_tya_tax_tay);
|
2017-01-24 21:18:52 +00:00
|
|
|
ATF_TP_ADD_TC(tp, emul_sta);
|
2017-01-18 16:18:19 +00:00
|
|
|
|
|
|
|
return (atf_no_error());
|
|
|
|
}
|
|
|
|
|