Mercurial > repos > blastem
view test_x86.c @ 1374:8f404b1fa572
Go back to resetting the refresh counter after a DMA. Probably not quite correct as it is probably reset on VDP triggered refresh, but this is close enough for now given the general limitations with my refresh code. VDP FIFO Testing seems to be passing 100% reliably again (was occassionally failing still with the last commit)
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 23 May 2017 23:47:40 -0700 |
parents | 9b7fcf748be0 |
children |
line wrap: on
line source
/* Copyright 2013 Michael Pavone This file is part of BlastEm. BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. */ #include "gen_x86.h" #include "m68k_core.h" #include <stdio.h> #include <stddef.h> int main(int argc, char ** argv) { uint8_t foo[512]; uint8_t *cur = foo, *end; cur = mov_rr(cur, RAX, RBX, SZ_B); cur = mov_rr(cur, RCX, RDX, SZ_B); cur = mov_rr(cur, R8, R9, SZ_B); cur = mov_rr(cur, R8, RAX, SZ_B); cur = mov_rr(cur, RAX, RBX, SZ_W); cur = mov_rr(cur, R11, R12, SZ_W); cur = mov_rr(cur, RAX, RBX, SZ_D); cur = mov_rr(cur, RAX, RBX, SZ_Q); cur = mov_ir(cur, 5, RAX, SZ_D); cur = mov_ir(cur, 3, R8, SZ_D); cur = mov_ir(cur, 4, RSP, SZ_B); cur = add_rr(cur, RAX, RBX, SZ_D); cur = add_ir(cur, 5, RAX, SZ_B); cur = add_ir(cur, 5, RBX, SZ_B); cur = add_ir(cur, 5, RBP, SZ_B); cur = pushf(cur); cur = popf(cur); cur = setcc_r(cur, CC_S, RBX); cur = setcc_r(cur, CC_Z, RDX); cur = setcc_r(cur, CC_O, BH); cur = setcc_r(cur, CC_C, DH); cur = setcc_rind(cur, CC_C, RSI); cur = mov_rrdisp8(cur, RCX, RSI, offsetof(m68k_context, dregs) + 4 * sizeof(uint32_t), SZ_D); cur = mov_rdisp8r(cur, RSI, offsetof(m68k_context, dregs) + 5 * sizeof(uint32_t), RCX, SZ_D); cur = mov_rrind(cur, DH, RSI, SZ_B); cur = jcc(cur, CC_NZ, -2); cur = jcc(cur, CC_Z, 0); cur = jcc(cur, CC_LE, 0x7CA); for (end = cur, cur = foo; cur != end; cur++) { printf(" %X", *cur); } puts(""); return 0; }