Giter Club home page Giter Club logo

z80's People

Contributors

agaxia avatar giomba avatar polluks avatar redcode avatar zoran-vucenovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

z80's Issues

Question

Hi, i port your code and i have a question about the case 0:
There is the ROL(value) and after that carry flag evaluation.
In cases 1-7 there is first the carry flag evaluation and after that the operation.
Is that a typo or is it the expected behavior?

(starting at about line 540 in Z80.c)
switch ((DATA[offset] >> 3) & 7)
{
/* rlc .----------------.
.----. | .---------. |
| CF |<-----| 7 <-- 0 |<--'
'----' '--------*/
case 0:
ROL(value);
cf = value & 1;
break;

	/* rrc	.----------------.
		|   .---------.  |   .----.
		'-->| 7 --> 0 |----->| CF |
		    '---------'      '---*/
	case 1:
	cf = value & 1;
	ROR(value);
	break;

	/* rl	.-------------------------.
		|  .----.   .---------.   |
		'--| CF |<--| 7 <-- 0 |<--'
		   '----'   '--------*/
	case 2:
	cf = value >> 7;
	value = (zuint8)((value << 1) | F_C);
	break;

	/* rr	.-------------------------.
		|   .---------.   .----.  |
		'-->| 7 --> 0 |-->| CF |--'
		    '---------'   '---*/
	case 3:
	cf = value & 1;
	value = (zuint8)((value >> 1) | ((zuint8)F_C << 7));
	break;

	/* sla	.----.	 .---------.
		| CF |<--| 7 <-- 0 |<-- 0
		'----'	 '--------*/
	case 4:
	cf = value >> 7;
	value <<= 1;
	break;

	/* sra	    .---------.   .----.
		.-->| 7 --> 0 |-->| CF |
		|   '---------'   '----'
		|     |
		'----*/
	case 5:
	cf = value & 1;
	value = (zuint8)((value & 128) | (value >> 1));
	break;

	/* sll	.----.	 .---------.
		| CF |<--| 7 <-- 0 |<-- 1
		'----'	 '--------*/
	case 6:
	cf = value >> 7;
	value = (zuint8)((value << 1) | 1);
	break;

	/* srl	     .---------.   .----.
		0 -->| 7 --> 0 |-->| CF |
		     '---------'   '---*/
	case 7:
	cf = value & 1;
	value >>= 1;
	break;

	/* Uncoment to avoid compiler warnings */
	/*default: cf = 0;*/
	}

zexall test suite failing

Running the zexall test suite with your Z80 core is showing some result mismatches. The very first ADC/SBC hl,rr test is failing, though since it's just a batched test it doesn't help identify what the problem is. Some of the later tests also report issues, but it could be from the same root cause.

I've run the same zexall.tap test through some of the popular Spectrum emulators and they're passing, so I believe the tests to be valid. I haven't had a chance to investigate it yet, but wanted to check you weren't already aware of it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.